So I can add a link to a debug symbol file like this objcopy --add-gnu-debuglink=$name.dbg $name
, but how can I later retrieve that value again?
I checked with readelf -a
and grepped for \.dbg
without any luck. Similarly I checked the with objdump -sj .gnu_debuglink
(.gnu_debuglink
is the section) and could see the value there:
$ objdump -sj .gnu_debuglink helloworld|grep \.dbg
0000 68656c6c 6f776f72 6c642e64 62670000 helloworld.dbg..
However, would there be a command that allows me to extract the retrieve the exact value again (i.e. helloworld.dbg
in the above example)? That is the file name only ...
I realize I could use some shell foo here, but it seems odd that an option exists to set this value but none to retrieve it. So I probably just missed it.
readelf
's attempt to render the CRC of the debuglink file. – Indigestive