This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Special names tha ld needs to recognize for hppa64-hp-hpux11.X
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: law at redhat dot com
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 11 Feb 2002 12:08:10 -0500 (EST)
- Subject: Re: Special names tha ld needs to recognize for hppa64-hp-hpux11.X
> Since we always create a dynamic binary it should be OK to leave the symbols
> undefined -- as long as the dynamic linker defines them for us.
I have a patch that leaves the dynamic-loader defined symbols undefined.
Something additional would be needed if we actually generated a static
binary and need to provide these symbols.
> Hell, with that I wonder if defining the various magic symbols in the linker
> script like I did was the right thing to do for those older symbols.
I think so. The ones that are provided are supposed to be linker defined
according to the "PA-64 Runtime Supplement". The only questionable one
is __TLS_SIZE. The HP compiler provides a default value for it equal to
0xc8 (at least, it does in a trivial program) while the linker script
provides a value of 0. On the other hand, I presume crt0.o initializes
tp (cr27). How does it find the start of .tbss? From the elf header?
>
> > It looks like elf-hppa.h needs to be hacked but I have the sense that
> > the generic elf code may not like undefined symbols from archive libraries.
> It should be OK to have an undefined symbol from an archive library,
> shared library or dynamic executable (as long as the symbol is never used or
> somehow defined at runtime).
That's what the HP linker does. However, I am not sure it hurts to define
the dynamic loader symbols in the linker. It's definitely simpler.
At the moment, a more serious issue is the treatment of LTOFF_* relocations
in static programs (see my mail on this yesterday). We need to fix this
before a decision can be made on the synamic loader defined symbols.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)