This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: dynamic relocations against stabs in a shared library
From: Jim Blandy <jimb@cygnus.com>
Date: 12 Jun 1999 00:08:28 -0500
If I understand you correctly, GDB should be applying relocs to the
.stab section before it reads the entries, because certain kinds of
debugging information can only be expressed using relocs. If this is
so, then changing the linker to resolve some relocs early just puts
off the problem, no? If the correct solution requires GDB to relocate
the .stabs, then let's do that, and not make questionable patches to
BFD.
At one time the debugging information generated by g++ required gdb to
relocate the .stabs section in order to get the correct information.
This is because at one time g++ would generate references to symbols
which were not defined in the shared library.
g++ may or may not act that way today. I don't know. It is in any
case a relatively rare situation, so it may or may not be important
for gdb to handle it.
I find the BFD manual somewhat confusing. If you could point me at
the right functions GDB should call to do this in a portable way, that
would be very helpful. Can I simply call:
- bfd_get_dynamic_reloc_upper_bound
- bfd_canonicalize_dynamic_reloc
- bfd_perform_relocation?
Something along those lines, yes. Whether it will really work in
practice, I don't know.
Ian