bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29390] New: On aarch64 binaries readelf --debug-dump=frame


From: wcohen at redhat dot com
Subject: [Bug binutils/29390] New: On aarch64 binaries readelf --debug-dump=frames reports DW_CFA_AARCH64_negate_ra_state as DW_CFA_GNU_window_save
Date: Wed, 20 Jul 2022 18:24:00 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29390

            Bug ID: 29390
           Summary: On aarch64 binaries readelf --debug-dump=frames
                    reports DW_CFA_AARCH64_negate_ra_state as
                    DW_CFA_GNU_window_save
           Product: binutils
           Version: 2.37
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

When reviewing the output of readelf --debug-dump=frames I noticed that the
output for aarch64 contained DW_CFA_GNU_window_save rather than the expected
DW_CFA_AARCH64_negate_ra_state.  Both of the call frame instructions are coded
as 0x2d.  However, the DW_CFA_GNU_window_save is for sparc binaries and the
DW_CFA_AARCH64_negate_ra_state is for aarch64 binaries.

It is pretty easy to demonstrate the issue on a fedora 36 aarch64 system with
the steps below. They shows many DW_CFA_GNU_window_save entries rather than
DW_CFA_AARCH64_negate_ra.

sudo dnf install systemtap
readelf --debug-dump=frames /usr/bin/stap |grep -v "^0" | awk -F: '{print
$1}'|grep DW_CFA |sort | uniq -c
  26096   DW_CFA_advance_loc
    783   DW_CFA_advance_loc1
    193   DW_CFA_advance_loc2
      5   DW_CFA_def_cfa
   5908   DW_CFA_def_cfa_offset
      2   DW_CFA_def_cfa_register
   5901   DW_CFA_GNU_window_save
   5014   DW_CFA_nop
  27676   DW_CFA_offset
     35   DW_CFA_offset_extended
   3110   DW_CFA_remember_state
  26685   DW_CFA_restore
     32   DW_CFA_restore_extended
   3110   DW_CFA_restore_state
      1   DW_CFA_undefined

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]