(fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
* config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
<OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
* config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
<OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
* config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
Likewise.
+2000-08-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
+ (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
+ * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
+ <OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
+ <OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
+ Likewise.
+
2000-08-22 Eric Christopher <echristo@cygnus.com>
* config/tc-mn10300.c: (md_apply_fix): New function.
#define TC_FIX_TYPE PTR
#define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL)
-/* This arranges for gas/write.c to not apply a relocation if
- obj_fix_adjustable() says it is not adjustable. */
-#define TC_DONT_FIX_NON_ADJUSTABLE 1
-
#ifdef OBJ_ELF
#include "write.h" /* For definition of fixS */
#define obj_fix_adjustable(fixP) arm_fix_adjustable (fixP)
boolean arm_fix_adjustable PARAMS ((fixS *));
+
+/* This arranges for gas/write.c to not apply a relocation if
+ obj_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
#else
#define obj_fix_adjustable(fixP) 0
#endif
type. The idea is that if the original type is already some kind of PIC
relocation, we leave it alone, otherwise we give it the desired type */
-/* This arranges for gas/write.c to not apply a relocation if
- tc_fix_adjustable() says it is not adjustable. */
-#define TC_DONT_FIX_NON_ADJUSTABLE 1
-
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
+#if defined (OBJ_ELF) || defined (OBJ_COFF) || defined (TE_PE)
+/* This arranges for gas/write.c to not apply a relocation if
+ tc_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
+#endif
+
/* This is the relocation type for direct references to GLOBAL_OFFSET_TABLE.
* It comes up in complicated expressions such as
* _GLOBAL_OFFSET_TABLE_+[.-.L284], which cannot be expressed normally with
&& ! S_IS_COMMON ((FIX)->fx_addsy)))
#endif
-/* This arranges for gas/write.c to not apply a relocation if
- tc_fix_adjustable() says it is not adjustable. */
-#define TC_DONT_FIX_NON_ADJUSTABLE 1
-
#ifndef OBJ_ELF
#define tc_fix_adjustable(FIXP) ((FIXP)->fx_bsr == 0)
+/* This arranges for gas/write.c to not apply a relocation if
+ tc_fix_adjustable() says it is not adjustable. */
+#define TC_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
#else
#define tc_fix_adjustable(FIXP) \
((FIXP)->fx_bsr == 0 \
&& S_IS_DEFINED ((FIX)->fx_addsy) \
&& ! S_IS_COMMON ((FIX)->fx_addsy)))
+#define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X)
+extern int tc_m68k_fix_adjustable PARAMS ((struct fix *));
+
+#ifdef OBJ_ELF
/* This arranges for gas/write.c to not apply a relocation if
tc_fix_adjustable() says it is not adjustable. */
-#define TC_DONT_FIX_NON_ADJUSTABLE 1
+#define TC_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
+#endif
-#define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X)
-extern int tc_m68k_fix_adjustable PARAMS ((struct fix *));
#define elf_tc_final_processing m68k_elf_final_processing
extern void m68k_elf_final_processing PARAMS ((void));
#endif
#define MD_APPLY_FIX3
#define md_operand(x)
+#define obj_fix_adjustable(fixP) v850_fix_adjustable(fixP)
+#define TC_FORCE_RELOCATION(fixp) v850_force_relocation(fixp)
+
+#ifdef OBJ_ELF
/* This arranges for gas/write.c to not apply a relocation if
obj_fix_adjustable() says it is not adjustable. */
-#define TC_DONT_FIX_NON_ADJUSTABLE 1
+#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
+#endif
-#define obj_fix_adjustable(fixP) v850_fix_adjustable(fixP)
-#define TC_FORCE_RELOCATION(fixp) v850_force_relocation(fixp)
extern int v850_force_relocation PARAMS ((struct fix *));
/* Permit temporary numeric labels. */
#define TC_FORCE_RELOCATION_SECTION(FIXP,SEG) TC_FORCE_RELOCATION(FIXP)
#endif
+#ifndef TC_FIX_ADJUSTABLE
+#define TC_FIX_ADJUSTABLE(fix) 1
+#endif
+
#ifndef TC_LINKRELAX_FIXUP
#define TC_LINKRELAX_FIXUP(SEG) 1
#endif
+#ifndef TC_FIX_ADJUSTABLE
+#define TC_FIX_ADJUSTABLE(fix) 1
+#endif
+
#ifndef MD_PCREL_FROM_SECTION
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from(FIXP)
#endif
else
{
seg_reloc_count++;
-#ifdef TC_DONT_FIX_NON_ADJUSTABLE
- if (1
-#ifdef obj_fix_adjustable
- && obj_fix_adjustable (fixP)
-#endif
-#ifdef tc_fix_adjustable
- && tc_fix_adjustable (fixP)
-#endif
- )
-#endif
+ if (TC_FIX_ADJUSTABLE (fixP))
add_number += S_GET_VALUE (add_symbolP);
}
}