diff options
author | Alan Modra <amodra@gmail.com> | 2002-07-09 09:46:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-07-09 09:46:18 +0000 |
commit | c66827056daabd0b8e8bfd0cf62767fdfc4a1918 (patch) | |
tree | 0ec25bcca7aec201356545f20328262537716b4a /gas | |
parent | ad42262f8f1b8cc9d8af7a593faa7fde13ebb529 (diff) | |
download | gdb-c66827056daabd0b8e8bfd0cf62767fdfc4a1918.zip gdb-c66827056daabd0b8e8bfd0cf62767fdfc4a1918.tar.gz gdb-c66827056daabd0b8e8bfd0cf62767fdfc4a1918.tar.bz2 |
* config/tc-i386.c (md_pseudo_table <file>): Warning fix.
(BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD.
(md_apply_fix3): Formatting. Remove redundant test.
(tc_gen_reloc): Remove redundant code.
(tc_i386_force_relocation): Delete. Movy body of function to..
* config/tc-i386.h (TC_FORCE_RELOCATION): .. here.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 32 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 11 |
3 files changed, 26 insertions, 26 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index e058276..dd26b0b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2002-07-09 Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (md_pseudo_table <file>): Warning fix. + (BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD. + (md_apply_fix3): Formatting. Remove redundant test. + (tc_gen_reloc): Remove redundant code. + (tc_i386_force_relocation): Delete. Movy body of function to.. + * config/tc-i386.h (TC_FORCE_RELOCATION): .. here. + 2002-07-09 Federico G. Schwindt <fgsch@olimpo.com.br> * configure.in: Add hppa-*-openbsd* target, change diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 5cf8251..2711fee 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -435,7 +435,7 @@ const pseudo_typeS md_pseudo_table[] = {"code64", set_code_flag, CODE_64BIT}, {"intel_syntax", set_intel_syntax, 1}, {"att_syntax", set_intel_syntax, 0}, - {"file", dwarf2_directive_file, 0}, + {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0}, {"loc", dwarf2_directive_loc, 0}, {0, 0, 0} }; @@ -1130,21 +1130,6 @@ pt (t) #endif /* DEBUG386 */ -int -tc_i386_force_relocation (fixp) - struct fix *fixp; -{ -#ifdef BFD_ASSEMBLER - if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT - || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - return 1; - return 0; -#else - /* For COFF. */ - return fixp->fx_r_type == 7; -#endif -} - #ifdef BFD_ASSEMBLER static bfd_reloc_code_real_type reloc PARAMS ((int, int, int, bfd_reloc_code_real_type)); @@ -1235,8 +1220,10 @@ tc_i386_fix_adjustable (fixP) } #else #define reloc(SIZE,PCREL,SIGN,OTHER) 0 +#define BFD_RELOC_8 0 #define BFD_RELOC_16 0 #define BFD_RELOC_32 0 +#define BFD_RELOC_8_PCREL 0 #define BFD_RELOC_16_PCREL 0 #define BFD_RELOC_32_PCREL 0 #define BFD_RELOC_386_PLT32 0 @@ -4462,12 +4449,12 @@ md_apply_fix3 (fixP, valP, seg) /* The fix we're to put in. */ fixS *fixP; /* Pointer to the value of the bits. */ - valueT * valP; + valueT *valP; /* Segment fix is from. */ segT seg ATTRIBUTE_UNUSED; { char *p = fixP->fx_where + fixP->fx_frag->fr_literal; - valueT value = * valP; + valueT value = *valP; #if defined (BFD_ASSEMBLER) && !defined (TE_Mach) if (fixP->fx_pcrel) @@ -4613,11 +4600,11 @@ md_apply_fix3 (fixP, valP, seg) break; } #endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ - * valP = value; + *valP = value; #endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ /* Are we finished with this relocation now? */ - if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) + if (fixP->fx_addsy == NULL) fixP->fx_done = 1; #ifdef BFD_ASSEMBLER else if (use_rela_relocations) @@ -5136,10 +5123,7 @@ tc_gen_reloc (section, fixp) if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) rel->address = fixp->fx_offset; - if (fixp->fx_pcrel) - rel->addend = fixp->fx_addnumber; - else - rel->addend = 0; + rel->addend = 0; } /* Use the rela in 64bit mode. */ else diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 8af8555..9bbf5ea 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -171,8 +171,15 @@ extern void x86_cons_fix_new PARAMS ((fragS *, unsigned int, unsigned int, expressionS *)); #endif -#define TC_FORCE_RELOCATION(fixp) tc_i386_force_relocation(fixp) -extern int tc_i386_force_relocation PARAMS ((struct fix *)); +#ifdef BFD_ASSEMBLER +#define TC_FORCE_RELOCATION(FIXP) \ + ((FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \ + || (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY) +#else +/* For COFF. */ +#define TC_FORCE_RELOCATION(FIXP) \ + ((FIXP)->fx_r_type == 7) +#endif #ifdef BFD_ASSEMBLER #define NO_RELOC BFD_RELOC_NONE |