Bug#558999: FTBFS [hppa] - recompile with -ffunction-sections
James Bottomley
James.Bottomley at suse.de
Tue Dec 1 17:31:26 UTC 2009
> I am not very good at GCC optimizations. Can you please explain why
> this problem is not seen on other architectures? Also can you please
> advise if I should add this compiler option for all arch or just hppa.
It's not really a gcc problem, it's an ELF one. The ELF spec for HPPA
says that we need to leave symbol resolution as a relative jump. On
parisc 32 bits, this is a 17bit relative jump. We can do longer by
indirecting through a stub section. However, this problem usually
occurs because the actual text section of the .o file is bigger than
131k (about 17 bits) and so the linker can't insert a reachable stub
into the binary.
-ffunction-sections splits the text section up into one section per
function, so now the linker can insert the stubs in between the
functions and thus the problem is solved (until a single function gets
longer than 131k).
Most other architectures have bigger relative jumps, so they likely
won't need -ffunction-sections (unless the file you're compiling gets
much bigger).
James
More information about the pkg-java-maintainers
mailing list