[Dwarf-Discuss] doubt parsing CIE in eh_frame

David Anderson davea42@linuxmail.org
Tue May 24 15:51:58 GMT 2016

On 05/24/2016 01:07 AM, Jakub Jelinek wrote:
> On Tue, May 24, 2016 at 09:46:58AM +0200, Francesco Zappa Nardelli wrote:
>> Dear David and all
>> If you could produce a small object file..
>> Invoking readelf on /lib/x86_64-linux-gnu/libc.so.6 is enough to observe
>> this (I am on Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-68-generic x86_64)):
>> $ readelf -wf /lib/x86_64-linux-gnu/libc.so.6 (and search for S in the
>> augmentation string)

The bug in readelf (I think) is at the end of display_debug_frames() in
dwarf.c (binutils directory).

The frame_display_row call is a bit odd if all that exist are nops and
results in the rax output
we see.
      if (do_debug_frames_interp)
        frame_display_row (fc, &need_col_headers, &max_regs);

      start = block_end;
      eh_addr_size = saved_eh_addr_size;

  printf ("\n");

  return 1;


More information about the Dwarf-discuss mailing list