This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Fix ld segfaults under hppa64-hp-hpux11
- From: law at redhat dot com
- To: dave dot anglin at nrc dot ca
- Cc: ross dot alexander at uk dot neceur dot com, amodra at bigpond dot net dot au, binutils at sources dot redhat dot com
- Date: Thu, 13 Jun 2002 11:47:58 -0600
- Subject: Re: Fix ld segfaults under hppa64-hp-hpux11
- Reply-to: law at redhat dot com
In message <3D08D1B9.E671298D@hiauly1.hia.nrc.ca>, John David Anglin writes:
> This is a multi-part message in MIME format.
> --------------2D09F75F34E8FF59AD9CE7A0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> law@redhat.com wrote:
>
> > Ross -- can you send me the shared libraries and main executable. I happe
> n
> > to have a dld.sl which will dump debugging information about the library
> > (assuming I can remember how to turn it on :-)
>
> Here are the libraries and main executable (test4) which I used in
> developing the patch. Running test4 will demonstrate the dld.sl
> problem. You will need to set LD_LIBRARY_PATH.
Thanks. I don't have a PA64 toolchain handy for hacking (and I dread
trying to remember how all the BFD code works :-) However, this might
be enough for you to track things down.
It appears the dynamic linker is complaining about the DT_HP_DLD_FLAGS or
the PLTGOT entries in the dynamic section:
Processing DT_NEEDED entry
Processing DT_HASH entry; nbucket = 17, num_symbols = 19
Processing DT_STRTAB entry
Processing DT_SYMTAB entry
Processing UNKNOWN entry
Processing UNKNOWN entry
Processing DT_HP_DLD_FLAGS entry
/usr/lib/pa20_64/dld.sl: './libtest2.sl' is not a valid load module.
Processing DT_PLTGOT entry
Processing DT_RELA entry
Processing DT_RELASZ entry
Processing UNKNOWN entry
readelf --dynamic reports:
readelf --dynamic libtest2.sl
Dynamic segment at offset 0x120 contains 12 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libtest1.sl]
0x0000000000000004 (HASH) 0x4000000000001230
0x0000000000000005 (STRTAB) 0x4000000000001490
0x0000000000000006 (SYMTAB) 0x40000000000012c8
0x000000000000000a (STRSZ) 52 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000060000001 (<unknown>: 60000001) 0
0x0000000000000003 (PLTGOT) 0x0
0x0000000000000007 (RELA) 0x40000000000014c8
0x0000000000000008 (RELASZ) 24 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x0000000000000000 (NULL) 0x0
The value 0x0000000060000001 indicates that it's DT_HP_DLD_FLAGS. It has
a value of "0", meaning no bits are set. It seems odd that it'd be
complaining about that. My recollection is that the DLD_FLAGS entry is
mandatory. You could try putting in a value like DT_HP_DEBUG_PRIVATE just
to test the theory that the dynamic linker doesn't like the zero value. Though
I see that various libraries in /usr/lib/pa20_64 have DLD_FLAGS with a zero
value.
It's also possible that it's complaining about the PLTGOT value, which is
zero, which I find rather odd. It should have a value like 0x80000000xxxxxxxx.
Anyway, I hope this helps track things down.
jeff