* write.h (struct fix <fx_pcrel_adjust, fx_size>): Move.
(struct fix <fx_plt>): Rename to tcbit2. * write.c (fix_new_internal): Adjust. (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt. * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-cris.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-i960.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-sh.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-sh64.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-sparc.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-msp430.c (msp430_force_relocation_local): Likewise. * config/tc-ia64.c (emit_one_bundle): Don't set fx_plt. * config/tc-ia64.h (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt. Instead, compare fx_r_type. * config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Use fx_tcbit in place of fx_plt. * config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Define. * doc/internals.texi (TC_FORCE_RELOCATION_LOCAL): Remove reference to fx_plt.
This commit is contained in:
parent
effdf42a7b
commit
20ee54e817
16 changed files with 58 additions and 43 deletions
|
@ -1,3 +1,26 @@
|
|||
2007-02-02 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* write.h (struct fix <fx_pcrel_adjust, fx_size>): Move.
|
||||
(struct fix <fx_plt>): Rename to tcbit2.
|
||||
* write.c (fix_new_internal): Adjust.
|
||||
(TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt.
|
||||
* config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-cris.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-i960.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-sh.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-sh64.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-sparc.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
|
||||
* config/tc-msp430.c (msp430_force_relocation_local): Likewise.
|
||||
* config/tc-ia64.c (emit_one_bundle): Don't set fx_plt.
|
||||
* config/tc-ia64.h (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt.
|
||||
Instead, compare fx_r_type.
|
||||
* config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Use
|
||||
fx_tcbit in place of fx_plt.
|
||||
* config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Define.
|
||||
* doc/internals.texi (TC_FORCE_RELOCATION_LOCAL): Remove reference
|
||||
to fx_plt.
|
||||
|
||||
2007-01-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* as.c (main): Mark symbols created via the --defsym command line
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This file is tc-arm.h
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
|
||||
Modified by David Taylor (dtaylor@armltd.co.uk)
|
||||
|
||||
|
@ -161,7 +161,6 @@ bfd_boolean arm_is_eabi (void);
|
|||
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32 \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_32 \
|
||||
|| TC_FORCE_RELOCATION (FIX))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-cris.h -- Header file for tc-cris.c, the CRIS GAS port.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Contributed by Axis Communications AB, Lund, Sweden.
|
||||
|
@ -99,10 +99,9 @@ extern int md_cris_force_relocation (struct fix *);
|
|||
|| (RTYPE) == BFD_RELOC_CRIS_32_PLT_PCREL)
|
||||
|
||||
/* Make sure we don't resolve fixups for which we want to emit dynamic
|
||||
relocations. FIXME: Set fx_plt instead of using IS_CRIS_PIC_RELOC. */
|
||||
relocations. */
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| IS_CRIS_PIC_RELOC ((FIX)->fx_r_type) \
|
||||
|| TC_FORCE_RELOCATION (FIX))
|
||||
|
||||
|
|
|
@ -457,7 +457,6 @@ extern int tc_i386_fix_adjustable (struct fix *);
|
|||
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_386_PLT32 \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_386_GOT32 \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_386_GOTPC \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tc-i960.h - Basic 80960 instruction formats.
|
||||
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003
|
||||
2000, 2001, 2002, 2003, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -139,7 +139,6 @@ extern int reloc_callj PARAMS ((struct fix *));
|
|||
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| TC_FORCE_RELOCATION (FIX) \
|
||||
|| reloc_callj (FIX))
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
|
@ -7067,7 +7067,6 @@ emit_one_bundle ()
|
|||
fix = fix_new_exp (frag_now, frag_now_fix () - 16 + i, 8,
|
||||
&ifix->expr, ifix->is_pcrel, ifix->code);
|
||||
fix->tc_fix_data.opnd = ifix->opnd;
|
||||
fix->fx_plt = (fix->fx_r_type == BFD_RELOC_IA64_PLTOFF22);
|
||||
fix->fx_file = md.slot[curr].src_file;
|
||||
fix->fx_line = md.slot[curr].src_line;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* tc-ia64.h -- Header file for tc-ia64.c.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
|
@ -315,5 +315,5 @@ typedef struct unwind_record
|
|||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
((FIX)->fx_r_type != BFD_RELOC_UNUSED \
|
||||
&& (!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_IA64_PLTOFF22 \
|
||||
|| TC_FORCE_RELOCATION (FIX)))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* tc-msp430.c -- Assembler code for the Texas Instruments MSP430
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Dmitry Diky <diwil@mail.ru>
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -1915,7 +1916,6 @@ msp430_force_relocation_local(fixS *fixp)
|
|||
return 1;
|
||||
else
|
||||
return (!fixp->fx_pcrel
|
||||
|| fixp->fx_plt
|
||||
|| generic_force_reloc(fixp));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This file is tc-sh.h
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -189,7 +189,6 @@ extern bfd_boolean sh_fix_adjustable (struct fix *);
|
|||
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_32_GOT_PCREL \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_SH_GOTPC \
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* This file is tc-sh64.h
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -79,7 +80,6 @@ extern int sh64_target_mach (void);
|
|||
#undef TC_FORCE_RELOCATION_LOCAL
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_32_PLT_PCREL \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_SH_PLT_LOW16 \
|
||||
|| (FIX)->fx_r_type == BFD_RELOC_SH_PLT_MEDLOW16 \
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* tc-sparc.h - Macros and type defines for the sparc.
|
||||
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
1999, 2000, 2001, 2002, 2003, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -91,7 +92,6 @@ extern void sparc_handle_align PARAMS ((struct frag *));
|
|||
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| (sparc_pic_code \
|
||||
&& S_IS_EXTERNAL ((FIX)->fx_addsy)) \
|
||||
|| TC_FORCE_RELOCATION (FIX))
|
||||
|
|
|
@ -4118,7 +4118,7 @@ xg_add_opcode_fix (TInsn *tinsn,
|
|||
if (expr->X_add_symbol
|
||||
&& (S_IS_EXTERNAL (expr->X_add_symbol)
|
||||
|| S_IS_WEAK (expr->X_add_symbol)))
|
||||
the_fix->fx_plt = TRUE;
|
||||
the_fix->fx_tcbit = TRUE;
|
||||
|
||||
the_fix->tc_fix_data.X_add_symbol = expr->X_add_symbol;
|
||||
the_fix->tc_fix_data.X_add_number = expr->X_add_number;
|
||||
|
@ -5566,7 +5566,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
|||
readable when all branch targets are encoded in relocations. */
|
||||
|
||||
assert (fixP->fx_addsy);
|
||||
if (S_GET_SEGMENT (fixP->fx_addsy) == seg && !fixP->fx_plt
|
||||
if (S_GET_SEGMENT (fixP->fx_addsy) == seg
|
||||
&& !fixP->fx_tcbit
|
||||
&& !S_FORCE_RELOC (fixP->fx_addsy, 1))
|
||||
{
|
||||
val = (S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
|
||||
|
|
|
@ -319,6 +319,10 @@ extern char *xtensa_section_rename (char *);
|
|||
#define TC_FORCE_RELOCATION(fix) xtensa_force_relocation (fix)
|
||||
#define TC_FORCE_RELOCATION_SUB_SAME(fix, seg) \
|
||||
(! SEG_NORMAL (seg) || xtensa_force_relocation (fix))
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_tcbit \
|
||||
|| TC_FORCE_RELOCATION (FIX))
|
||||
#define TC_VALIDATE_FIX_SUB(fix) xtensa_validate_fix_sub (fix)
|
||||
#define NO_PSEUDO_DOT xtensa_check_inside_bundle ()
|
||||
#define tc_canonicalize_symbol_name(s) xtensa_section_rename (s)
|
||||
|
|
|
@ -1279,7 +1279,7 @@ absolute symbol. If undefined, @code{TC_FORCE_RELOCATION} will be used.
|
|||
@cindex TC_FORCE_RELOCATION_LOCAL
|
||||
Like @code{TC_FORCE_RELOCATION}, but used only for fixup expressions against a
|
||||
symbol in the current section. If undefined, fixups that are not
|
||||
@code{fx_pcrel} or @code{fx_plt} or for which @code{TC_FORCE_RELOCATION}
|
||||
@code{fx_pcrel} or for which @code{TC_FORCE_RELOCATION}
|
||||
returns non-zero, will emit relocs.
|
||||
|
||||
@item TC_FORCE_RELOCATION_SUB_SAME (@var{fix}, @var{seg})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* write.c - emit .o file
|
||||
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -45,7 +45,6 @@
|
|||
#ifndef TC_FORCE_RELOCATION_LOCAL
|
||||
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
||||
(!(FIX)->fx_pcrel \
|
||||
|| (FIX)->fx_plt \
|
||||
|| TC_FORCE_RELOCATION (FIX))
|
||||
#endif
|
||||
|
||||
|
@ -169,13 +168,13 @@ fix_new_internal (fragS *frag, /* Which frag? */
|
|||
fixP->fx_offset = offset;
|
||||
fixP->fx_dot_value = dot_value;
|
||||
fixP->fx_pcrel = pcrel;
|
||||
fixP->fx_plt = 0;
|
||||
fixP->fx_r_type = r_type;
|
||||
fixP->fx_im_disp = 0;
|
||||
fixP->fx_pcrel_adjust = 0;
|
||||
fixP->fx_bit_fixP = 0;
|
||||
fixP->fx_addnumber = 0;
|
||||
fixP->fx_tcbit = 0;
|
||||
fixP->fx_tcbit2 = 0;
|
||||
fixP->fx_done = 0;
|
||||
fixP->fx_no_overflow = 0;
|
||||
fixP->fx_signed = 0;
|
||||
|
|
28
gas/write.h
28
gas/write.h
|
@ -1,6 +1,7 @@
|
|||
/* write.h
|
||||
Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
|
||||
2002, 2003, 2005, 2006 Free Software Foundation, Inc.
|
||||
2002, 2003, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
|
@ -45,29 +46,16 @@ struct fix
|
|||
/* These small fields are grouped together for compactness of
|
||||
this structure, and efficiency of access on some architectures. */
|
||||
|
||||
/* pc-relative offset adjust (only used by m68k) */
|
||||
char fx_pcrel_adjust;
|
||||
|
||||
/* How many bytes are involved? */
|
||||
unsigned char fx_size;
|
||||
|
||||
/* Is this a pc-relative relocation? */
|
||||
unsigned fx_pcrel : 1;
|
||||
|
||||
/* Is this a relocation to a procedure linkage table entry? If so,
|
||||
some of the reductions we try to apply are invalid. A better way
|
||||
might be to represent PLT entries with different kinds of
|
||||
symbols, and use normal relocations (with undefined symbols);
|
||||
look into it for version 2.6. */
|
||||
unsigned fx_plt : 1;
|
||||
|
||||
/* Is this value an immediate displacement? */
|
||||
/* Only used on i960 and ns32k; merge it into TC_FIX_TYPE sometime. */
|
||||
/* Only used on ns32k; merge it into TC_FIX_TYPE sometime. */
|
||||
unsigned fx_im_disp : 2;
|
||||
|
||||
/* A bit for the CPU specific code.
|
||||
This probably can be folded into tc_fix_data, below. */
|
||||
/* Some bits for the CPU specific code. */
|
||||
unsigned fx_tcbit : 1;
|
||||
unsigned fx_tcbit2 : 1;
|
||||
|
||||
/* Has this relocation already been applied? */
|
||||
unsigned fx_done : 1;
|
||||
|
@ -82,6 +70,12 @@ struct fix
|
|||
/* The value is signed when checking for overflow. */
|
||||
unsigned fx_signed : 1;
|
||||
|
||||
/* pc-relative offset adjust (only used by m68k and m68hc11) */
|
||||
char fx_pcrel_adjust;
|
||||
|
||||
/* How many bytes are involved? */
|
||||
unsigned char fx_size;
|
||||
|
||||
/* Which frag does this fix apply to? */
|
||||
fragS *fx_frag;
|
||||
|
||||
|
|
Loading…
Reference in a new issue