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: 21 Aug 2000 12:05:27 -0700
> From: Ian Lance Taylor <ian@zembu.com>

>    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.

I believe that it's done by treating (a) undefined symbols as an error
and (b) the start address of the shared library as 0.  The debugger
expects the second.

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

Oh, aargh!  I need a little '@windriver' warning bell.

OK, then, the last time _that_ came up, I think I said that if you
want to run the debugger on .o files than it should understand relocs,
as these are an essential part of the .o file format, and that
includes knowing that RELA relocs generally replace the contents of
the location they're relocating.

... but I also said that I don't care that much, so long as there's a
comment saying this is for compatibility with the vxworks debugger, so
that future generations won't be puzzled over the code.
-- 
- Geoffrey Keating <geoffk@cygnus.com>

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