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]
Other format: [Raw text]

Re: ld -lgen -ladm causes assert failure in gnu ld 2.12.1 and 2.13 under Solaris 2.7 or 2.8


On Sun, Sep 22, 2002 at 01:05:35PM -0400, Andrew Koenig wrote:
> Daniel> Preferably the former.  Could you try wrapping the linker in a shell
> Daniel> script which adds -z nocombreloc (at the end of arguments, I think..)
> Daniel> and rebuilding both GCC 3.2 and Python?  That way libgcc_s, libstdc++,
> Daniel> etc. will be built without combreloc.
> 
> I have a simpler suggestion.  I changed the test script to specify
> zcombreloc explicitly, and as I expected, it crashes under binutils 2.12.1.
> So the answer, I think, is to produce a version of binutils that will run
> this script correctly before looking for other problems.

Oh well, Sun changing the rules.
It seems like ld.so behaviour changes based on whether DT_RELACOUNT is
seen or not.
If DT_RELACOUNT is not seen, R_SPARC_RELATIVE relocs are resolved as
*(long *) rela->r_offset += l_addr + rela->r_addend;
while if DT_RELACOUNT is seen, it is resolved as:
*(long *) rela->r_offset = l_addr + rela->r_addend;

Traditionally, Sun ld (for elf32_sparc) created all .rela.got RELATIVE
relocations with r_addend 0 and the addend in memory pointed by it while other
RELATIVE had the addend in r_addend and *r_offset 0.

Great, how I love this. Now prelink -u will not work
properly on sparc-linux until everything is relinked :(.

	Jakub


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