This is the mail archive of the binutils@sources.redhat.com 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]

Re: [PATCH: re-submit] - fix offsets in DWARF when linking relocatable (-r)


   Date: Mon, 21 Aug 2000 11:44:01 -0700
   From: Geoff Keating <geoffk@cygnus.com>

   > We noticed that when linking together object files with DWARF debug
   > info in relocatable mode resulting DWARF debug info is not correct
   > because relocations are used to describe offsets in other sections.
   > And since RELA is used for PPC that offsetes are kept in relocation 
   > itself not in actual debug section. That patch fix that. It updates
   > offsets in debug sections as well. It's safe: they will be 
   > overwritten at final link time. But that makes possible to debug
   > relocatable files as well as finally linked

   I think the last time this came up, I think we decided that it makes
   no sense to have any kind of relocation against non-loaded sections
   like DWARF sections.  So the right patch is to resolve all relocations
   against non-loaded sections in the linker.

I'll just add that in some cases involving shared libraries this is
impossible.

And note that Igor is talking about debugging relocateable files, not
fully linked files.

Ian

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