diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-08-22 04:52:40 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2000-08-22 04:52:40 +0000 |
commit | 8f36cd18af6756dd6ab50da33d2c7574fc711527 (patch) | |
tree | 5e35d0c637c073c3f6c5e236b8fd5b20886aa86e /gas | |
parent | 58a77e418b6999bee8e5e54e5483d24536bb93c0 (diff) | |
download | gdb-8f36cd18af6756dd6ab50da33d2c7574fc711527.zip gdb-8f36cd18af6756dd6ab50da33d2c7574fc711527.tar.gz gdb-8f36cd18af6756dd6ab50da33d2c7574fc711527.tar.bz2 |
* 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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 11 | ||||
-rw-r--r-- | gas/config/tc-arm.h | 8 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 10 | ||||
-rw-r--r-- | gas/config/tc-i960.h | 7 | ||||
-rw-r--r-- | gas/config/tc-m68k.h | 9 | ||||
-rw-r--r-- | gas/config/tc-v850.h | 9 | ||||
-rw-r--r-- | gas/write.c | 19 |
7 files changed, 45 insertions, 28 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d6117d6..ae9d16f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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. diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 28d8bc4..76cf767 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -116,14 +116,14 @@ #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 diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index e4a5731..9c4609b 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -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 diff --git a/gas/config/tc-i960.h b/gas/config/tc-i960.h index dca9d4a..4623532 100644 --- a/gas/config/tc-i960.h +++ b/gas/config/tc-i960.h @@ -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 \ diff --git a/gas/config/tc-m68k.h b/gas/config/tc-m68k.h index 1941e30..10ac44e 100644 --- a/gas/config/tc-m68k.h +++ b/gas/config/tc-m68k.h @@ -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 diff --git a/gas/config/tc-v850.h b/gas/config/tc-v850.h index 59fa507..97b903e 100644 --- a/gas/config/tc-v850.h +++ b/gas/config/tc-v850.h @@ -37,12 +37,15 @@ #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. */ diff --git a/gas/write.c b/gas/write.c index 67d39ab..978fcc2 100644 --- a/gas/write.c +++ b/gas/write.c @@ -48,10 +48,18 @@ #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); } } |