[PATCH] Revert of tc-sparc.h changes which break pic
Ian Lance Taylor
ian@zembu.com
Tue Jul 27 12:28:00 GMT 1999
Date: Mon, 26 Jul 1999 18:15:13 +0200
From: Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz>
Ian's patch to tc-sparc.h broke -fpic/PIC support on SPARC completely.
I agree the patch is the right way to go, but first of all
elf{32,64}_sparc.c have to be tought to grok it.
The issue is that the change made symbols like .LLC001 go away and thus
assembler output was GOT22/GOT13/GOT10 with e.g. .rodata symbol and non-zero
addend, which sparc ELF backends just screw up.
I'm concerned that changing the addends won't work with the Solaris
native linker.
I have instead checked in this patch, which follows the usual
fix_adjustable approach for ELF files. Sorry for the problems.
Ian
Index: config/tc-sparc.h
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/tc-sparc.h,v
retrieving revision 1.4
diff -u -r1.4 tc-sparc.h
--- tc-sparc.h 1999/07/16 21:30:35 1.4
+++ tc-sparc.h 1999/07/27 19:25:34
@@ -127,6 +127,12 @@
#define tc_fix_adjustable(FIX) \
(! S_IS_EXTERNAL ((FIX)->fx_addsy) \
&& ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && (FIX)->fx_r_type != BFD_RELOC_SPARC_GOT10 \
+ && (FIX)->fx_r_type != BFD_RELOC_SPARC_GOT13 \
+ && (FIX)->fx_r_type != BFD_RELOC_SPARC_GOT22 \
+ && (FIX)->fx_r_type != BFD_RELOC_SPARC_WPLT30 \
+ && (FIX)->fx_r_type != BFD_RELOC_VTABLE_INHERIT \
+ && (FIX)->fx_r_type != BFD_RELOC_VTABLE_ENTRY \
&& (! sparc_pic_code \
|| (FIX)->fx_pcrel \
|| ((FIX)->fx_subsy != NULL \
More information about the Binutils
mailing list