This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fix for tc-s390.[ch]
- To: binutils at sources dot redhat dot com
- Subject: Fix for tc-s390.[ch]
- From: schwidefsky at de dot ibm dot com
- Date: Mon, 26 Mar 2001 17:52:30 +0200
Hi,
I found another bug in the S/390 backend. The special S/390 relocation
@GOTENT can't be "optimised" because it references a got entry. Here
is the patch and the ChangeLog entry:
2001-03-26 Martin Schwidefsky <schwidefsky@de.ibm.com>
* config/tc-s390.c: Add test for BFD_RELOC_390_GOTENT to
tc_s390_fix_adjustable.
* config/tc-s390.h: Add test for BFD_RELOC_390_GOTENT to
TC_RELOC_RTSYM_LOC_FIXUP.
diff -urN src/gas/config/tc-s390.c src-s390/gas/config/tc-s390.c
--- src/gas/config/tc-s390.c Thu Mar 15 11:47:53 2001
+++ src-s390/gas/config/tc-s390.c Mon Mar 26 11:37:53 2001
@@ -1488,6 +1488,7 @@
|| fixP->fx_r_type == BFD_RELOC_390_GOT16
|| fixP->fx_r_type == BFD_RELOC_32_GOT_PCREL
|| fixP->fx_r_type == BFD_RELOC_390_GOT64
+ || fixP->fx_r_type == BFD_RELOC_390_GOTENT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
diff -urN src/gas/config/tc-s390.h src-s390/gas/config/tc-s390.h
--- src/gas/config/tc-s390.h Thu Mar 15 11:47:53 2001
+++ src-s390/gas/config/tc-s390.h Mon Mar 26 11:38:01 2001
@@ -36,12 +36,13 @@
checked here. I am not sure if some of the others are ever used with
pcrel, but it is easier to be safe than sorry. */
-#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
- ((FIX)->fx_addsy == NULL \
- || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
- && ! S_IS_WEAK ((FIX)->fx_addsy) \
- && S_IS_DEFINED ((FIX)->fx_addsy) \
- && ! S_IS_COMMON ((FIX)->fx_addsy)))
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_r_type != BFD_RELOC_390_GOTENT \
+ && ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy))))
#define tc_fix_adjustable(X) tc_s390_fix_adjustable(X)
extern int tc_s390_fix_adjustable PARAMS ((struct fix *));
---
blue skies,
Martin
Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com