linkmap from PT_DYNAMIC

Aleksandar Ristovski aristovski@qnx.com
Thu Oct 16 20:57:00 GMT 2008


Hello,

Currently GDB will scan dyntags from dynamic section only 
(solib-svr4.c:scan_dyntag). However, if the section header 
does not exist (for example it has been stripped away) then 
gdb gives up, even though the section will be present in the 
form of dynamic segment.

When examining core files when having only a stripped 
executable (stripped in such a way that it does not contain 
section headers), gdb will not be able to do much.

The attached patch will resort to using PT_DYNAMIC to get 
dynamic section and scan dyntag. The patch will only change 
default (current) behaviour if bfd_get_section_by_name 
returns NULL.

Any thoughts?

Thanks,

Aleksandar Ristovski
QNX Software Systems

-------------- next part --------------
A non-text attachment was scrubbed...
Name: solib-svr4.c-lmfromPT_DYNAMIC.20081016.diff
Type: text/x-patch
Size: 2664 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20081016/49284b27/attachment.bin>


More information about the Gdb mailing list