This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: hppa glibc ld -r
- To: Alan Modra <alan at linuxcare dot com dot au>
- Subject: Re: hppa glibc ld -r
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Thu, 17 Aug 2000 08:23:08 -0700
- Cc: libc-alpha at sources dot redhat dot com, parisc-linux at thepuffingroup dot com,parisc at lists dot linuxcare dot com
- References: <Pine.LNX.4.21.0008171700460.28670-100000@front.linuxcare.com.au>
On Thu, Aug 17, 2000 at 05:59:48PM +1000, Alan Modra wrote:
>
> -ffunction-sections isn't a complete solution though. If two source files
> declare a local function of the same name, "setup", for instance, then
> both files will have a section called ".text.setup". These two sections
> will be merged during the "ld -r", which has the unfortunate effect of
Can you teach ld not to merge ".text.xxxxx" with -r under HPPA?
> moving a local function to a location a long way off from where it's
> called. That's bad, firstly because it means we now need a stub to reach
> the function, but more importantly the stubs are not PIC and thus need
> relocation information when creating shared libraries. In particular, for
> reasons too complicated to explain here, I don't want to create stubs for
> local functions; It would mean emitting relocs for every *potential*
> stub.
>
> Anybody know why glibc uses "ld -r", and if there is a good reason why
> we can't just remove the "ld -r"?
I don't think it has to be used. --whole-archive will do the same
trick. But "ld -r" is more convenient. With --whole-archive, you may
have to put -Wl,--whole-archive/-Wl,--no-whole-archive around each file
generarted with "ld -r"
H.J.