* write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 22 Aug 2000 04:52:40 +0000 (04:52 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 22 Aug 2000 04:52:40 +0000 (04:52 +0000)
(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.

gas/ChangeLog
gas/config/tc-arm.h
gas/config/tc-i386.h
gas/config/tc-i960.h
gas/config/tc-m68k.h
gas/config/tc-v850.h
gas/write.c

index d6117d6..ae9d16f 100644 (file)
@@ -1,3 +1,14 @@
+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.
index 28d8bc4..76cf767 100644 (file)
 #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
index e4a5731..9c4609b 100644 (file)
@@ -38,13 +38,15 @@ struct fix;
    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
index dca9d4a..4623532 100644 (file)
@@ -153,12 +153,11 @@ extern int i960_validate_fix PARAMS ((struct fix *, segT, symbolS **));
        && ! 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                                                 \
index 1941e30..10ac44e 100644 (file)
@@ -173,12 +173,15 @@ while (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
index 59fa507..97b903e 100644 (file)
 #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.  */
index 67d39ab..978fcc2 100644 (file)
 #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
@@ -2710,16 +2718,7 @@ fixup_segment (fixP, this_segment_type)
              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);
                }
            }