This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC. Don't emit dynamic relocs for debug sections.


On Fri, Apr 15, 2005 at 05:14:17PM +0930, Alan Modra wrote:
> This patch removes dynamic debug relocs on PowerPC.  It's somewhat
> controversial, for example, see
> http://sources.redhat.com/ml/binutils/2002-09/msg00611.html and
> http://sources.redhat.com/ml/binutils/2002-10/msg00020.html
> but
> 
> o  Currently, nothing uses these relocs.
> o  The only real use is for a gcc extension, which probably ought to
>    describe the asm symbol mapping by some means other than relocs, ie.
>    by some DWARF2 construct.
> o  HJ Lu's binutils, used by most Linux distributions, doesn't emit them.
> 
> Since file bloat is a real concern to distributions, and I'd like to
> encourage use of FSF binutils releases, I intend to apply this patch
> on mainline and for the 2.16 release.  If gdb does start using dynamic
> relocs on debug info sometime this decade, then this change can easily
> be reverted.

FYI: I actually tried to make GDB use the dynamic relocations this
week, having coaxed an old version of binutils into using R_PPC_ADDR32
relocations in shared library debug information.  BFD makes this very,
very difficult, because the relocation sections on a shared .debug_info
reference the dynamic symbol table, not the static symbol table.  So
the debug sections do not have SEC_RELOC; bfd_get_relocated_section_contents
can't find the right relocations; et cetera.

It's all possible to untangle, but it seems fairly clear to me that the
linker fix remains preferable :-)

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]