* 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.
This commit is contained in:
Alexandre Oliva 2000-08-22 04:52:40 +00:00
parent 58a77e418b
commit 8f36cd18af
7 changed files with 47 additions and 30 deletions

View 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.

View file

@ -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

View 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

View 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 \

View file

@ -173,12 +173,15 @@ 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 *));
#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_FIX_ADJUSTABLE(fixP) tc_fix_adjustable (fixP)
#endif
#define elf_tc_final_processing m68k_elf_final_processing
extern void m68k_elf_final_processing PARAMS ((void));
#endif

View file

@ -37,12 +37,15 @@
#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)
#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_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP)
#endif
extern int v850_force_relocation PARAMS ((struct fix *));
/* Permit temporary numeric labels. */

View file

@ -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);
}
}