[parisc-linux] Get rid of %r8 linker stubs

bame@riverrock.org bame@riverrock.org
Tue, 04 Jul 2000 19:52:33 -0600


= Alan Modra <alan@linuxcare.com.au> writes:
= 
= > The trouble is that _init is a single function that's been split in two
= > (see glibc/csu/Makefile crti,crtn), thus the linker thinks it's quite OK
= > to insert a stub at the start of the second section.  I'll have to do
= > something special with the .init section to work around this problem.
= 
= Simply create an appropriate initfini.c file for HP/UX.  Look in the
= current glibc sources and you'll see that we already do this for SH.

I don't think that'll work, because the parisc linker thinks it's allowed
to insert stubs in between separately-loaded things like functions.  The
use of .init from multiple .o files looks to the linker just like the
use of .text from multiple .o files.  I'd say there's a good chance the
linker might insert stubs *between* individual .init entries too (not
to mention .fini, and in general users can probably create arbitrary
segments to act similarly).

So unless we get to change how .init works (ugly hacks to gas perhaps?
I hope not) I think a special case in the linker is required.  I just
hope there's some sort of attribute on these magic kludge segments which
the linker can use rather than hard-coding the names or something.

Hopefully someone else has a better idea.

	-Paul Bame