mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
* configure.in: Make all i386-elf targets use bfd_gas.
* config/tc-i386.c (tc_i386_force_relocation): New. (tc_i386_fix_adjustable): Don't fix vtable relocs. (md_apply_fix3): Likewise. (tc_gen_reloc): Handle them. * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling tc_i386_force_relocation.
This commit is contained in:
parent
68631a8643
commit
a1624e3f1b
@ -1,3 +1,13 @@
|
||||
Sat Aug 29 22:18:51 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* configure.in: Make all i386-elf targets use bfd_gas.
|
||||
* config/tc-i386.c (tc_i386_force_relocation): New.
|
||||
(tc_i386_fix_adjustable): Don't fix vtable relocs.
|
||||
(md_apply_fix3): Likewise.
|
||||
(tc_gen_reloc): Handle them.
|
||||
* config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling
|
||||
tc_i386_force_relocation.
|
||||
|
||||
Mon Aug 24 13:40:21 1998 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* config/tc-arm.c (md_show_usage): Improve formatting of --help output.
|
||||
|
@ -803,6 +803,21 @@ 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 (size, pcrel, other)
|
||||
@ -852,11 +867,13 @@ tc_i386_fix_adjustable(fixP)
|
||||
return 0;
|
||||
if (S_IS_WEAK (fixP->fx_addsy))
|
||||
return 0;
|
||||
#endif /* ! defined (OBJ_AOUT) */
|
||||
#endif
|
||||
/* adjust_reloc_syms doesn't know about the GOT */
|
||||
if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF
|
||||
|| fixP->fx_r_type == BFD_RELOC_386_PLT32
|
||||
|| fixP->fx_r_type == BFD_RELOC_386_GOT32)
|
||||
|| fixP->fx_r_type == BFD_RELOC_386_GOT32
|
||||
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|
||||
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
@ -3146,6 +3163,11 @@ md_apply_fix3 (fixP, valp, seg)
|
||||
case BFD_RELOC_386_GOTOFF:
|
||||
break;
|
||||
|
||||
case BFD_RELOC_VTABLE_INHERIT:
|
||||
case BFD_RELOC_VTABLE_ENTRY:
|
||||
fixP->fx_done = 0;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3458,6 +3480,8 @@ tc_gen_reloc (section, fixp)
|
||||
case BFD_RELOC_386_GOTOFF:
|
||||
case BFD_RELOC_386_GOTPC:
|
||||
case BFD_RELOC_RVA:
|
||||
case BFD_RELOC_VTABLE_ENTRY:
|
||||
case BFD_RELOC_VTABLE_INHERIT:
|
||||
code = fixp->fx_r_type;
|
||||
break;
|
||||
default:
|
||||
@ -3490,7 +3514,13 @@ tc_gen_reloc (section, fixp)
|
||||
|
||||
rel = (arelent *) xmalloc (sizeof (arelent));
|
||||
rel->sym_ptr_ptr = &fixp->fx_addsy->bsym;
|
||||
|
||||
rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
|
||||
/* HACK: Since i386 ELF uses Rel instead of Rela, encode the
|
||||
vtable entry to be used in the relocation's section offset. */
|
||||
if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
|
||||
rel->address = fixp->fx_offset;
|
||||
|
||||
if (fixp->fx_pcrel)
|
||||
rel->addend = fixp->fx_addnumber;
|
||||
else
|
||||
|
633
gas/configure
vendored
633
gas/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -164,7 +164,7 @@ changequote([,])dnl
|
||||
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
|
||||
dnl start-sanitize-beos
|
||||
i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
|
||||
i386-*-beoself* | i386-*-beos*) fmt=elf ;;
|
||||
i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
|
||||
dnl end-sanitize-beos
|
||||
i386-*-bsd*) fmt=aout em=386bsd ;;
|
||||
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
|
||||
@ -172,11 +172,11 @@ dnl end-sanitize-beos
|
||||
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
|
||||
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
|
||||
i386-*-linux*coff*) fmt=coff em=linux ;;
|
||||
i386-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
|
||||
i386-*-lynxos*) fmt=coff em=lynx ;;
|
||||
i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
|
||||
fmt=elf ;;
|
||||
i386-*-freebsdelf*) fmt=elf ;;
|
||||
fmt=elf bfd_gas=yes ;;
|
||||
i386-*-freebsdelf*) fmt=elf bfd_gas=yes ;;
|
||||
i386-*-freebsd*) fmt=aout em=386bsd ;;
|
||||
i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
|
||||
fmt=coff ;;
|
||||
@ -296,8 +296,8 @@ dnl end-sanitize-beos
|
||||
sparc-fujitsu-none) fmt=aout ;;
|
||||
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
|
||||
fmt=elf ;;
|
||||
sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
|
||||
sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
|
||||
sparc-*-netbsd*) fmt=aout em=nbsd ;;
|
||||
sparc-*-openbsd*) fmt=aout em=nbsd ;;
|
||||
|
||||
tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
|
||||
tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
|
||||
|
Loading…
Reference in New Issue
Block a user