linker relocation of debug information

Jeff Baker jbaker@qnx.com
Tue Jan 27 21:03:00 GMT 2004


Does anyone remember when this behaviour was changed in the binutils?

> On Fri, Jan 23, 2004 at 02:06:00PM -0500, Kris Warkentin wrote:
> > I've noticed with ld 2.12.1 that sometimes debug information isn't
> > relocated in shared libs.  Particularily, I'm seeing that the old
> > relocations still happen with i386 and mips but not with sh, arm or
> powerpc.
> >
> > The problem that I'm having is that we're shipping gdb 5.2.1 which
> > doesn't seem to be able to deal with the unrelocated debug info when
> > stepping into shared libs although newer gdbs can.  Can anyone give me
> > any information about this?  Is debug info relocation deprecated?  Am I
> > completely misunderstanding what's going on here?
> 
> You could take a look at the other differences between the libraries,
> namely, that relocation sections are emitted from the debug
> information.  GDB 6.0 explicitly processes this information.
> 
> Personally, I think this is a dumb policy, and that relocating
> .stab/.debug_info at link time is always appropriate for shared
> libraries.  This has come up at least three times in the list archives
> for the past two years.
> 
> For instance, this will have severe performance implications for GDB,
> in that a current bottleneck that I plan to fix won't be fixable for
> such libraries.
> 
> Note that GDB has to process the relocation data anyway in order to
> load unlinked objects using add-symbol-file.
> 
> >
> > cheers,
> >
> > Kris
> >
> > ***OLD***
> > int blah /* 0x17d8 */;
> > unsigned int some_global /* 0x17dc */;
> > int dllfunc ()
> > { /* 0x5f4 */
> > /* file /home/kewarken/61/test/libdll.c line 7 addr 0x5f4 */
> > /* file /home/kewarken/61/test/libdll.c line 8 addr 0x608 */
> > /* file /home/kewarken/61/test/libdll.c line 9 addr 0x60c */
> > /* file /home/kewarken/61/test/libdll.c line 10 addr 0x614 */
> > } /* 0x62c */
> >
> > ***NEW***
> > int blah /* 0x17e8 */;
> > unsigned int some_global /* 0x17ec */;
> > int dllfunc ()
> > { /* 0x0 */
> > /* file /61/home/kewarken/test/ppc-630/blah/../../libdll.c line 7 addr
> > 0x0 */
> > /* file /61/home/kewarken/test/ppc-630/blah/../../libdll.c line 8 addr
> > 0x14 */
> > /* file /61/home/kewarken/test/ppc-630/blah/../../libdll.c line 9 addr
> > 0x18 */
> > /* file /61/home/kewarken/test/ppc-630/blah/../../libdll.c line 10 addr
> > 0x20 */
> > } /* 0x38 */
> >
> >
> >
> 
> --
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list