This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LTO and asm specs...


There is one g++ LTO test case (g++.lto/20090303) that fails on sparc,
it compiles the intermediate objects with -fPIC but the final
compilation creates an executable.

The problem is that when LTO re-instantiates the options for the
individual builds, the proper ASM specs of the target are not
executed, so in this case "-K PIC" is not passed down to the assembler
in response to "-fPIC".

As a consequence, relocations against _GLOBAL_OFFSET_TABLE_
in code like this:

	sethi	%hi(_GLOBAL_OFFSET_TABLE_), %g1

use the R_SPARC_HI22 relocation instead of R_SPARC_PC22.

Thus the program crashes.

I couldn't figure out immediately how to fix this as the
way LTO does spec overriding and such looked non-trivial.

Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]