[parisc-linux] Applications in 64 bits userspace

John David Anglin dave@hiauly1.hia.nrc.ca
Fri, 4 Apr 2003 13:48:57 -0500 (EST)


> I get random email from people who've seen my libc-alpha postings, and
> they want to know how to fix their busted gcc (hppa2.0w) + HPUX linker
> compiles... looks like floating point loads and stores with bad 
> relocations (the reason we disable fpregs in the rtld code for glibc).

This sounds like a configuration mixup but I would have to see
a real bug report to be sure.  Regarding disabling fpregs, this
might not be a good idea.  Integer multiplication uses the xmpyu
instruction.  There is millicode support for 32-bit multiplication
but not for 64-bit multiplication.  On the 64-bit port, loop
unrolling can cause a multiply instruction to emitted after
virtual registers are instantiated.  If fpregs are disabled,
the multiply requires a libcall.  Emitting a libcall, requires
setting the arg pointer using the virtual outgoing args register.
There is a small chance that we might not have reserved enough
space for the outgoing arguments when this is done after virtual
register instantiation.  You need -nostdlib when linking as
various functions in libgcc uses the xmpyu instruction.

> How so? -static and -nostdlib and add all the bits yourself?

No.  The dynamic loader is still required to resolve some special
symbols.  I also think the file format is not quite right for
a static executable.  I'm sure that it would be possible to generate
a truly static binary but I'm not sure how much work is involved.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)