On Wed, 23 Mar 2011 17:47:36 +0100, Roland McGrath wrote:
What's the rationale for including the .opd section in the .debug
the synthetic `.funcname' instructions-pointing symbols are generated on ppc64
by BFD on its own from the function descriptor ELF symbols `funcname'.
(DWARF symbols `funcname' point to the instructions which may be confusing.)
BFD has no idea about the linkage of the binary and the .debug BFD files.
Only GDB connects the binary and the .debug BFD files content for the user.
IIUC there would be needed some new API part to generate the synthetic symbols
in cooperation with GDB providing the BFD files .debug_link read out linkage
to the BFD synthetic functions producer.
It is really just like any other text or data.
I agree it is only a workaround of the BFD design. For libc.so.6 2172512
bytes the .opd section is 42472 bytes (1.95%).
Why can't you use the symbols
from the .debug file and read the data from the main file just like you do
for "p initialized_variable" or "disas function" without an inferior?
`p'/`disas' are GDB functionality. `.funcname' symbols are BFD