diff -urN src/gas/config/tc-s390.c src-s390/gas/config/tc-s390.c --- src/gas/config/tc-s390.c Thu Sep 20 13:08:00 2001 +++ src-s390/gas/config/tc-s390.c Thu Oct 4 12:54:52 2001 @@ -1641,6 +1641,35 @@ return 1; } +/* Return true if we must always emit a reloc for a type and false if + there is some hope of resolving it a assembly time. */ +int +tc_s390_force_relocation (fixp) + struct fix *fixp; +{ + switch (fixp->fx_r_type) + { + case BFD_RELOC_390_GOT12: + case BFD_RELOC_32_GOT_PCREL: + case BFD_RELOC_32_GOTOFF: + case BFD_RELOC_390_GOTPC: + case BFD_RELOC_390_GOT16: + case BFD_RELOC_390_GOTPCDBL: + case BFD_RELOC_390_GOT64: + case BFD_RELOC_390_GOTENT: + case BFD_RELOC_390_PLT32: + case BFD_RELOC_390_PLT16DBL: + case BFD_RELOC_390_PLT32DBL: + case BFD_RELOC_390_PLT64: + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + return 1; + + default: + return 0; + } +} + /* Apply a fixup to the object code. This is called for all the fixups we generated by the call to fix_new_exp, above. In the call above we used a reloc code which was the largest legal reloc code diff -urN src/gas/config/tc-s390.h src-s390/gas/config/tc-s390.h --- src/gas/config/tc-s390.h Thu Jul 26 21:07:01 2001 +++ src-s390/gas/config/tc-s390.h Thu Oct 4 12:30:47 2001 @@ -44,9 +44,8 @@ && S_IS_DEFINED ((FIX)->fx_addsy) \ && ! S_IS_COMMON ((FIX)->fx_addsy)))) -#define TC_FORCE_RELOCATION(FIXP) \ - ((FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \ - || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY) +#define TC_FORCE_RELOCATION(FIXP) tc_s390_force_relocation(FIXP) +extern int tc_s390_force_relocation PARAMS ((struct fix *)); #define tc_fix_adjustable(X) tc_s390_fix_adjustable(X) extern int tc_s390_fix_adjustable PARAMS ((struct fix *));