]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 18 Aug 2000 18:45:05 +0000 (18:45 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Fri, 18 Aug 2000 18:45:05 +0000 (18:45 +0000)
obj_fix_adjustable() and tc_fix_adjustable() to tell whether to
add a symbol's address.  Removed all target-specific #ifdefs that
used to accomplished the same.
* config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
* config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.

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 bca5da89f7094fc16aa5d6a891b0f47f266eab8f..011b7d8480413d2504d4bebb89e03837c2e13198 100644 (file)
@@ -1,3 +1,15 @@
+2000-08-18  Alexandre Oliva  <aoliva@redhat.com>
+
+       * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use
+       obj_fix_adjustable() and tc_fix_adjustable() to tell whether to
+       add a symbol's address.  Removed all target-specific #ifdefs that
+       used to accomplished the same.
+       * config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+       * config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+       * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+       * config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+       * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+
 2000-08-17  Kazu Hirata  <kazu@hxi.com>
 
        * dwarf2dbg.c: Fix formatting.
index c5ab88705125669fcd795783cbda1422a10c29cc..28d8bc4ed26410ab315eed0d70d1649ef633e7d8 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)
index c43569087ce6696ca36149fee742262d52a3fc8f..e4a5731857fe6440ec3e1effbf179f13efcc9aa6 100644 (file)
@@ -38,6 +38,10 @@ 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 *));
 
index 2746edeeb232f317450ad7c72f589b36cb218e73..dca9d4a61a7e53178ffdab6a92a9d20742822a62 100644 (file)
@@ -153,6 +153,10 @@ 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)
 #else
index b3daf5e023c7a0e43c7d7cf622f7902ac27044c3..1941e300837396b7e1ba8d3e50e836976001799b 100644 (file)
@@ -173,6 +173,10 @@ while (0)
             && S_IS_DEFINED ((FIX)->fx_addsy)          \
             && ! S_IS_COMMON ((FIX)->fx_addsy)))
 
+/* 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_m68k_fix_adjustable(X)
 extern int tc_m68k_fix_adjustable PARAMS ((struct fix *));
 #define elf_tc_final_processing m68k_elf_final_processing
index fad4d1cf8501d47155df4d685f9be0dbdcbcbdd3..59fa5074211b8053461e777b93d84bba886d84f2 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-v850.h -- Header file for tc-v850.c.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
 #define MD_APPLY_FIX3
 #define md_operand(x)
 
+/* 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 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 *));
index e9e4f8a7e249b094648217b1465a36ea539a6d42..cb5070995e81523ad1f7c4144fc2e261639d7e3e 100644 (file)
@@ -2706,17 +2706,17 @@ fixup_segment (fixP, this_segment_type)
              else
                {
                  seg_reloc_count++;
-#if !(defined (TC_V850) && defined (OBJ_ELF))
-#if !(defined (TC_M68K) && defined (OBJ_ELF))
-#if !(defined (TC_ARM)  && defined (OBJ_ELF))
-#if !(defined (TC_I960) && defined (OBJ_ELF))
-#if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE)
-                 add_number += S_GET_VALUE (add_symbolP);
-#endif
-#endif
+#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
+                   add_number += S_GET_VALUE (add_symbolP);
                }
            }
        }