mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
bbd19b19e4
NaCl has been deprecated: https://developer.chrome.com/native-client/migration and NaCl will completely disappear in 2021: https://lists.llvm.org/pipermail/llvm-dev/2020-April/141107.html Remove x86 NaCl target support from bfd, binutils, gas and ld. bfd/ * archures.c (bfd_mach_i386_nacl): Removed. (bfd_mach_i386_i386_nacl): Likewise. (bfd_mach_x86_64_nacl): Likewise. (bfd_mach_x64_32_nacl): Likewise. * config.bfd: Remove *-*-nacl* targets. * configure.ac: Remove x86 NaCl target vectors. * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): Removed. (bfd_x64_32_nacl_arch): Likewise. (bfd_x86_64_nacl_arch): Likewise. (bfd_i386_nacl_arch): Likewise. (bfd_x64_32_arch_intel_syntax): Updated. * elf32-i386.c: Don't include "elf-nacl.h". (elf_i386_nacl_plt): Removed. (elf_i386_nacl_plt0_entry): Likewise. (elf_i386_nacl_plt_entry): Likewise. (elf_i386_nacl_pic_plt0_entry): Likewise. (elf_i386_nacl_pic_plt_entry): Likewise. (elf_i386_nacl_eh_frame_plt): Likewise. (elf_i386_nacl_plt): Likewise. (elf32_i386_nacl_elf_object_p): Likewise. (elf_i386_get_synthetic_symtab): Updated. (elf_i386_link_setup_gnu_properties): Likewise. * elf64-x86-64.c: Don't include "elf-nacl.h". (elf_x86_64_nacl_plt): Removed. (elf64_x86_64_nacl_elf_object_p): Likewise. (elf_x86_64_nacl_plt0_entry): Likewise. (elf_x86_64_nacl_plt_entry): Likewise. (elf_x86_64_nacl_eh_frame_plt): Likewise. (elf_x86_64_nacl_plt): Likewise. (elf32_x86_64_nacl_elf_object_p): Likewise. (elf_x86_64_get_synthetic_symtab): Updated. (elf_x86_64_link_setup_gnu_properties): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Likewise. * targets.c: Remove x86 NaCl target vectors. * bfd-in2.h: Regenerated. * configure: Likewise. binutils/ * NEWS: Mention x86 NaCl target support removal. * dwarf.c (init_dwarf_regnames_by_bfd_arch_and_mach): Remove x86 NaCl target support. * testsuite/binutils-all/elfedit-1.d: Likewise. * testsuite/binutils-all/i386/i386.exp: Likewise. * testsuite/binutils-all/x86-64/objects.exp: Likewise. * testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494a.d: Likewise. * testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494b.d: Likewise. * testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494c.d: Likewise. * testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494d.d: Likewise. * testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494e.d: Likewise. * testsuite/binutils-all/x86-64/x86-64.exp: Likewise. gas/ * NEWS: Mention x86 NaCl target support removal. * config/tc-i386.c: Remove x86 NaCl target support. * config/tc-i386.h: Likewise. * configure.tgt: Likewise. * testsuite/gas/i386/i386.exp: Likewise. * testsuite/gas/i386/iamcu-1.d: Likewise. * testsuite/gas/i386/iamcu-2.d: Likewise. * testsuite/gas/i386/iamcu-3.d: Likewise. * testsuite/gas/i386/iamcu-4.d: Likewise. * testsuite/gas/i386/iamcu-5.d: Likewise. * testsuite/gas/i386/k1om.d: Likewise. * testsuite/gas/i386/l1om.d: Likewise. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Remove eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c. Remove x86 NaCl dep files. * NEWS: Mention x86 NaCl target support removal. * configure.tgt: Remove x86 NaCl target support. * testsuite/ld-elf/binutils.exp: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-i386/align-branch-1.d: Likewise. * testsuite/ld-i386/export-class.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-i386/load1.d: Likewise. * testsuite/ld-i386/pie1.d: Likewise. * testsuite/ld-i386/pr12570a.d: Likewise. * testsuite/ld-i386/pr12570b.d: Likewise. * testsuite/ld-i386/pr19636-1d.d: Likewise. * testsuite/ld-i386/pr19636-1l.d: Likewise. * testsuite/ld-i386/pr19636-2c.d: Likewise. * testsuite/ld-i386/pr19636-2d.d: Likewise. * testsuite/ld-i386/pr19636-2e.d: Likewise. * testsuite/ld-i386/pr20244-1a.d: Likewise. * testsuite/ld-i386/pr20244-1b.d: Likewise. * testsuite/ld-i386/pr20244-2a.d: Likewise. * testsuite/ld-i386/pr20244-2b.d: Likewise. * testsuite/ld-i386/pr20244-2c.d: Likewise. * testsuite/ld-i386/pr20244-4a.d: Likewise. * testsuite/ld-i386/pr20244-4b.d: Likewise. * testsuite/ld-i386/pr21884.d: Likewise. * testsuite/ld-ifunc/binutils.exp: Likewise. * testsuite/ld-ifunc/ifunc-10-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-10-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-11-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-11-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-12-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-12-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-13-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-13-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-14a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-14a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-14b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-14b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-14c-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-14c-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-14d-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-14d-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-14e-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-14e-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-14f-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-14f-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-15-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-15-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-16-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-16-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-16-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-16-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-17a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-17a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-17b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-17b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-18a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-18a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-18b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-18b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-19a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-19a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-19b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-19b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-20-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-20-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-21-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-22-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-5a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-5a-local-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-5a-local-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-5a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-5b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-5b-local-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-5b-local-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-5b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-5r-local-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-6a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-6a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-6b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-6b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-7a-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-7a-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-7b-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-7b-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-8-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-8-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-9-i386.d: Likewise. * testsuite/ld-ifunc/ifunc-9-x86-64.d: Likewise. * testsuite/ld-ifunc/pr17154-i386-now.d: Likewise. * testsuite/ld-ifunc/pr17154-i386.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64.d: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-x86-64/align-branch-1.d: Likewise. * testsuite/ld-x86-64/dwarfreloc.exp: Likewise. * testsuite/ld-x86-64/line.exp: Likewise. * testsuite/ld-x86-64/load1a.d: Likewise. * testsuite/ld-x86-64/load1b.d: Likewise. * testsuite/ld-x86-64/load1c.d: Likewise. * testsuite/ld-x86-64/load1d.d: Likewise. * testsuite/ld-x86-64/pie3.d: Likewise. * testsuite/ld-x86-64/pr18160.d: Likewise. * testsuite/ld-x86-64/pr19013-x32.d: Likewise. * testsuite/ld-x86-64/pr19013.d: Likewise. * testsuite/ld-x86-64/pr19636-2d.d: Likewise. * testsuite/ld-x86-64/pr19636-2l.d: Likewise. * testsuite/ld-x86-64/pr20253-1b.d: Likewise. * testsuite/ld-x86-64/pr20253-1d.d: Likewise. * testsuite/ld-x86-64/pr20253-1f.d: Likewise. * testsuite/ld-x86-64/pr20253-1h.d: Likewise. * testsuite/ld-x86-64/pr20253-1j.d: Likewise. * testsuite/ld-x86-64/pr20253-1l.d: Likewise. * testsuite/ld-x86-64/pr21884.d: Likewise. * testsuite/ld-x86-64/pr22393-3a.rd: Likewise. * testsuite/ld-x86-64/pr22393-3b.rd: Likewise. * testsuite/ld-x86-64/tlsgd10.dd: Likewise. * testsuite/ld-x86-64/tlsgd5.dd: Likewise. * testsuite/ld-x86-64/tlsgd8.dd: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * emulparams/elf32_x86_64_nacl.sh: Removed. * emulparams/elf_i386_nacl.sh: Likewise. * emulparams/elf_x86_64_nacl.sh: Likewise. * testsuite/ld-i386/emit-relocs-nacl.rd: Likewise. * testsuite/ld-i386/load1-nacl.d: Likewise. * testsuite/ld-i386/pie1-nacl.d: Likewise. * testsuite/ld-i386/plt-nacl.pd: Likewise. * testsuite/ld-i386/plt-pic-nacl.pd: Likewise. * testsuite/ld-i386/pr17709-nacl.rd: Likewise. * testsuite/ld-i386/pr19636-1d-nacl.d: Likewise. * testsuite/ld-i386/pr19636-2c-nacl.d: Likewise. * testsuite/ld-i386/pr19636-2d-nacl.d: Likewise. * testsuite/ld-i386/pr19636-2e-nacl.d: Likewise. * testsuite/ld-i386/pr19827-nacl.rd: Likewise. * testsuite/ld-i386/pr21884-nacl.d: Likewise. * testsuite/ld-i386/pr21884-nacl.t: Likewise. * testsuite/ld-i386/tlsbin-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin2-nacl.rd: Likewise. * testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsnopic-nacl.rd: Likewise. * testsuite/ld-i386/tlspic-nacl.rd: Likewise. * testsuite/ld-i386/tlspic2-nacl.rd: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/load1a-nacl.d: Likewise. * testsuite/ld-x86-64/load1b-nacl.d: Likewise. * testsuite/ld-x86-64/load1c-nacl.d: Likewise. * testsuite/ld-x86-64/load1d-nacl.d: Likewise. * testsuite/ld-x86-64/pie3-nacl.d: Likewise. * testsuite/ld-x86-64/plt-nacl.pd: Likewise. * testsuite/ld-x86-64/pr17709-nacl.rd: Likewise. * testsuite/ld-x86-64/pr19013-nacl.d: Likewise. * testsuite/ld-x86-64/pr19636-2d-nacl.d: Likewise. * testsuite/ld-x86-64/pr19827-nacl.rd: Likewise. * testsuite/ld-x86-64/pr21884-nacl.d: Likewise. * testsuite/ld-x86-64/pr21884-nacl.t: Likewise. * testsuite/ld-x86-64/split-by-file-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsdesc-nacl.pd: Likewise. * testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic2-nacl.rd: Likewise. * Makefile.in: Regenerated. * po/BLD-POTFILES.in: Likewise.
394 lines
12 KiB
C
394 lines
12 KiB
C
/* tc-i386.h -- Header file for tc-i386.c
|
|
Copyright (C) 1989-2020 Free Software Foundation, Inc.
|
|
|
|
This file is part of GAS, the GNU Assembler.
|
|
|
|
GAS is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3, or (at your option)
|
|
any later version.
|
|
|
|
GAS is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GAS; see the file COPYING. If not, write to the Free
|
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
|
02110-1301, USA. */
|
|
|
|
#ifndef TC_I386
|
|
#define TC_I386 1
|
|
|
|
#include "opcodes/i386-opc.h"
|
|
|
|
struct fix;
|
|
|
|
#define TARGET_BYTES_BIG_ENDIAN 0
|
|
|
|
#define TARGET_ARCH (i386_arch ())
|
|
#define TARGET_MACH (i386_mach ())
|
|
extern enum bfd_architecture i386_arch (void);
|
|
extern unsigned long i386_mach (void);
|
|
|
|
#ifdef TE_FreeBSD
|
|
#define AOUT_TARGET_FORMAT "a.out-i386-freebsd"
|
|
#endif
|
|
#ifdef TE_NetBSD
|
|
#define AOUT_TARGET_FORMAT "a.out-i386-netbsd"
|
|
#endif
|
|
#ifdef TE_386BSD
|
|
#define AOUT_TARGET_FORMAT "a.out-i386-bsd"
|
|
#endif
|
|
#ifdef TE_LINUX
|
|
#define AOUT_TARGET_FORMAT "a.out-i386-linux"
|
|
#endif
|
|
#ifdef TE_Mach
|
|
#define AOUT_TARGET_FORMAT "a.out-mach3"
|
|
#endif
|
|
#ifdef TE_DYNIX
|
|
#define AOUT_TARGET_FORMAT "a.out-i386-dynix"
|
|
#endif
|
|
#ifndef AOUT_TARGET_FORMAT
|
|
#define AOUT_TARGET_FORMAT "a.out-i386"
|
|
#endif
|
|
|
|
#ifdef TE_FreeBSD
|
|
#define ELF_TARGET_FORMAT "elf32-i386-freebsd"
|
|
#define ELF_TARGET_FORMAT64 "elf64-x86-64-freebsd"
|
|
#elif defined (TE_VXWORKS)
|
|
#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
|
|
#elif defined TE_CLOUDABI
|
|
#define ELF_TARGET_FORMAT64 "elf64-x86-64-cloudabi"
|
|
#endif
|
|
|
|
#ifdef TE_SOLARIS
|
|
#define ELF_TARGET_FORMAT "elf32-i386-sol2"
|
|
#define ELF_TARGET_FORMAT64 "elf64-x86-64-sol2"
|
|
#endif
|
|
|
|
#ifndef ELF_TARGET_FORMAT
|
|
#define ELF_TARGET_FORMAT "elf32-i386"
|
|
#endif
|
|
|
|
#ifndef ELF_TARGET_FORMAT64
|
|
#define ELF_TARGET_FORMAT64 "elf64-x86-64"
|
|
#endif
|
|
|
|
#ifndef ELF_TARGET_FORMAT32
|
|
#define ELF_TARGET_FORMAT32 "elf32-x86-64"
|
|
#endif
|
|
|
|
#ifndef ELF_TARGET_L1OM_FORMAT
|
|
#define ELF_TARGET_L1OM_FORMAT "elf64-l1om"
|
|
#endif
|
|
|
|
#ifndef ELF_TARGET_K1OM_FORMAT
|
|
#define ELF_TARGET_K1OM_FORMAT "elf64-k1om"
|
|
#endif
|
|
|
|
#ifndef ELF_TARGET_IAMCU_FORMAT
|
|
#define ELF_TARGET_IAMCU_FORMAT "elf32-iamcu"
|
|
#endif
|
|
|
|
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
|
|
|| defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
|
|
|| defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
|
|
extern const char *i386_target_format (void);
|
|
#define TARGET_FORMAT i386_target_format ()
|
|
#else
|
|
#ifdef TE_GO32
|
|
#define TARGET_FORMAT "coff-go32"
|
|
#endif
|
|
#ifdef OBJ_AOUT
|
|
#define TARGET_FORMAT AOUT_TARGET_FORMAT
|
|
#endif
|
|
#endif
|
|
|
|
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
|
|
|
|
/* '$' may be used as immediate prefix. */
|
|
#undef LOCAL_LABELS_DOLLAR
|
|
#define LOCAL_LABELS_DOLLAR 0
|
|
#undef LOCAL_LABELS_FB
|
|
#define LOCAL_LABELS_FB 1
|
|
|
|
extern const char extra_symbol_chars[];
|
|
#define tc_symbol_chars extra_symbol_chars
|
|
|
|
extern const char *i386_comment_chars;
|
|
#define tc_comment_chars i386_comment_chars
|
|
|
|
/* The name of the global offset table generated by the compiler. Allow
|
|
this to be overridden if need be. */
|
|
#ifndef GLOBAL_OFFSET_TABLE_NAME
|
|
#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
|
|
#endif
|
|
|
|
#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (LEX_AT)
|
|
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES)
|
|
#endif
|
|
extern bfd_reloc_code_real_type x86_cons (expressionS *, int);
|
|
|
|
#define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP, RELOC) \
|
|
x86_cons_fix_new(FRAG, OFF, LEN, EXP, RELOC)
|
|
extern void x86_cons_fix_new
|
|
(fragS *, unsigned int, unsigned int, expressionS *, bfd_reloc_code_real_type);
|
|
|
|
#define TC_ADDRESS_BYTES x86_address_bytes
|
|
extern int x86_address_bytes (void);
|
|
|
|
#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
|
|
|
|
#define NO_RELOC BFD_RELOC_NONE
|
|
|
|
void i386_validate_fix (struct fix *);
|
|
#define TC_VALIDATE_FIX(FIX,SEGTYPE,SKIP) i386_validate_fix(FIX)
|
|
|
|
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
|
|
extern int tc_i386_fix_adjustable (struct fix *);
|
|
|
|
/* Values passed to md_apply_fix don't include the symbol value. */
|
|
#define MD_APPLY_SYM_VALUE(FIX) 0
|
|
|
|
/* ELF wants external syms kept, as does PE COFF. */
|
|
#if defined (TE_PE) && defined (STRICT_PE_FORMAT)
|
|
#define EXTERN_FORCE_RELOC \
|
|
(OUTPUT_FLAVOR == bfd_target_elf_flavour \
|
|
|| OUTPUT_FLAVOR == bfd_target_coff_flavour)
|
|
#else
|
|
#define EXTERN_FORCE_RELOC \
|
|
(OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
|
#endif
|
|
|
|
/* This expression evaluates to true if the relocation is for a local
|
|
object for which we still want to do the relocation at runtime.
|
|
False if we are willing to perform this relocation while building
|
|
the .o file. GOTOFF and GOT32 do not need to be checked here because
|
|
they are not pcrel. .*/
|
|
|
|
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
|
|
(GENERIC_FORCE_RELOCATION_LOCAL (FIX) \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_386_PLT32 \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_386_GOTPC \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCREL \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_REX_GOTPCRELX)
|
|
|
|
#define TC_FORCE_RELOCATION_ABS(FIX) \
|
|
(TC_FORCE_RELOCATION (FIX) \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_386_GOT32 \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_386_GOT32X \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCREL \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX \
|
|
|| (FIX)->fx_r_type == BFD_RELOC_X86_64_REX_GOTPCRELX)
|
|
|
|
extern int i386_parse_name (char *, expressionS *, char *);
|
|
#define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)
|
|
|
|
extern operatorT i386_operator (const char *name, unsigned int operands, char *);
|
|
#define md_operator i386_operator
|
|
|
|
extern int i386_need_index_operator (void);
|
|
#define md_need_index_operator i386_need_index_operator
|
|
|
|
#define md_register_arithmetic 0
|
|
|
|
extern const struct relax_type md_relax_table[];
|
|
#define TC_GENERIC_RELAX_TABLE md_relax_table
|
|
|
|
extern int optimize_align_code;
|
|
|
|
#define md_do_align(n, fill, len, max, around) \
|
|
if ((n) \
|
|
&& !need_pass_2 \
|
|
&& optimize_align_code \
|
|
&& (!(fill) \
|
|
|| ((char)*(fill) == (char)0x90 && (len) == 1)) \
|
|
&& subseg_text_p (now_seg)) \
|
|
{ \
|
|
frag_align_code ((n), (max)); \
|
|
goto around; \
|
|
}
|
|
|
|
#define MAX_MEM_FOR_RS_ALIGN_CODE (alignment ? ((1 << alignment) - 1) : 1)
|
|
|
|
extern void i386_cons_align (int);
|
|
#define md_cons_align(nbytes) i386_cons_align (nbytes)
|
|
|
|
void i386_print_statistics (FILE *);
|
|
#define tc_print_statistics i386_print_statistics
|
|
|
|
extern unsigned int i386_frag_max_var (fragS *);
|
|
#define md_frag_max_var i386_frag_max_var
|
|
|
|
extern long i386_generic_table_relax_frag (segT, fragS *, long);
|
|
#define md_generic_table_relax_frag(segment, fragP, stretch) \
|
|
i386_generic_table_relax_frag (segment, fragP, stretch)
|
|
|
|
#define md_number_to_chars number_to_chars_littleendian
|
|
|
|
enum processor_type
|
|
{
|
|
PROCESSOR_UNKNOWN,
|
|
PROCESSOR_I386,
|
|
PROCESSOR_I486,
|
|
PROCESSOR_PENTIUM,
|
|
PROCESSOR_PENTIUMPRO,
|
|
PROCESSOR_PENTIUM4,
|
|
PROCESSOR_NOCONA,
|
|
PROCESSOR_CORE,
|
|
PROCESSOR_CORE2,
|
|
PROCESSOR_COREI7,
|
|
PROCESSOR_L1OM,
|
|
PROCESSOR_K1OM,
|
|
PROCESSOR_IAMCU,
|
|
PROCESSOR_K6,
|
|
PROCESSOR_ATHLON,
|
|
PROCESSOR_K8,
|
|
PROCESSOR_GENERIC32,
|
|
PROCESSOR_GENERIC64,
|
|
PROCESSOR_AMDFAM10,
|
|
PROCESSOR_BD,
|
|
PROCESSOR_ZNVER,
|
|
PROCESSOR_BT
|
|
};
|
|
|
|
extern enum processor_type cpu_arch_tune;
|
|
extern enum processor_type cpu_arch_isa;
|
|
extern i386_cpu_flags cpu_arch_isa_flags;
|
|
|
|
struct i386_tc_frag_data
|
|
{
|
|
union
|
|
{
|
|
fragS *padding_fragP;
|
|
fragS *branch_fragP;
|
|
} u;
|
|
addressT padding_address;
|
|
enum processor_type isa;
|
|
i386_cpu_flags isa_flags;
|
|
enum processor_type tune;
|
|
unsigned int max_bytes;
|
|
unsigned char length;
|
|
unsigned char last_length;
|
|
unsigned char max_prefix_length;
|
|
unsigned char prefix_length;
|
|
unsigned char default_prefix;
|
|
unsigned char cmp_size;
|
|
unsigned int mf_type : 3;
|
|
unsigned int classified : 1;
|
|
unsigned int branch_type : 3;
|
|
};
|
|
|
|
/* We need to emit the right NOP pattern in .align frags. This is
|
|
done after the text-to-bits assembly pass, so we need to mark it with
|
|
the isa/tune settings at the time the .align was assembled. */
|
|
#define TC_FRAG_TYPE struct i386_tc_frag_data
|
|
|
|
#define TC_FRAG_INIT(FRAGP, MAX_BYTES) \
|
|
do \
|
|
{ \
|
|
(FRAGP)->tc_frag_data.u.padding_fragP = NULL; \
|
|
(FRAGP)->tc_frag_data.padding_address = 0; \
|
|
(FRAGP)->tc_frag_data.isa = cpu_arch_isa; \
|
|
(FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags; \
|
|
(FRAGP)->tc_frag_data.tune = cpu_arch_tune; \
|
|
(FRAGP)->tc_frag_data.max_bytes = (MAX_BYTES); \
|
|
(FRAGP)->tc_frag_data.length = 0; \
|
|
(FRAGP)->tc_frag_data.last_length = 0; \
|
|
(FRAGP)->tc_frag_data.max_prefix_length = 0; \
|
|
(FRAGP)->tc_frag_data.prefix_length = 0; \
|
|
(FRAGP)->tc_frag_data.default_prefix = 0; \
|
|
(FRAGP)->tc_frag_data.cmp_size = 0; \
|
|
(FRAGP)->tc_frag_data.classified = 0; \
|
|
(FRAGP)->tc_frag_data.branch_type = 0; \
|
|
(FRAGP)->tc_frag_data.mf_type = 0; \
|
|
} \
|
|
while (0)
|
|
|
|
#define WORKING_DOT_WORD 1
|
|
|
|
/* How to generate NOPs for .nop direct directive. */
|
|
extern void i386_generate_nops (fragS *, char *, offsetT, int);
|
|
#define md_generate_nops(frag, where, amount, control) \
|
|
i386_generate_nops ((frag), (where), (amount), (control))
|
|
|
|
#define HANDLE_ALIGN(fragP) \
|
|
if (fragP->fr_type == rs_align_code) \
|
|
{ \
|
|
offsetT __count = (fragP->fr_next->fr_address \
|
|
- fragP->fr_address \
|
|
- fragP->fr_fix); \
|
|
if (__count > 0 \
|
|
&& (unsigned int) __count <= fragP->tc_frag_data.max_bytes) \
|
|
md_generate_nops (fragP, fragP->fr_literal + fragP->fr_fix, \
|
|
__count, 0); \
|
|
}
|
|
|
|
/* We want .cfi_* pseudo-ops for generating unwind info. */
|
|
#define TARGET_USE_CFIPOP 1
|
|
|
|
extern unsigned int x86_dwarf2_return_column;
|
|
#define DWARF2_DEFAULT_RETURN_COLUMN x86_dwarf2_return_column
|
|
|
|
extern int x86_cie_data_alignment;
|
|
#define DWARF2_CIE_DATA_ALIGNMENT x86_cie_data_alignment
|
|
|
|
extern int x86_dwarf2_addr_size (void);
|
|
#define DWARF2_ADDR_SIZE(bfd) x86_dwarf2_addr_size ()
|
|
|
|
#define tc_parse_to_dw2regnum tc_x86_parse_to_dw2regnum
|
|
extern void tc_x86_parse_to_dw2regnum (expressionS *);
|
|
|
|
#define tc_cfi_frame_initial_instructions tc_x86_frame_initial_instructions
|
|
extern void tc_x86_frame_initial_instructions (void);
|
|
|
|
#define md_elf_section_type(str,len) i386_elf_section_type (str, len)
|
|
extern int i386_elf_section_type (const char *, size_t);
|
|
|
|
#ifdef TE_SOLARIS
|
|
#define md_fix_up_eh_frame(sec) i386_solaris_fix_up_eh_frame (sec)
|
|
extern void i386_solaris_fix_up_eh_frame (segT);
|
|
#endif
|
|
|
|
/* Support for SHF_X86_64_LARGE */
|
|
extern bfd_vma x86_64_section_word (char *, size_t);
|
|
extern bfd_vma x86_64_section_letter (int, const char **);
|
|
#define md_elf_section_letter(LETTER, PTR_MSG) x86_64_section_letter (LETTER, PTR_MSG)
|
|
#define md_elf_section_word(STR, LEN) x86_64_section_word (STR, LEN)
|
|
|
|
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
|
|
extern void x86_cleanup (void);
|
|
#define md_cleanup() x86_cleanup ()
|
|
#endif
|
|
|
|
#ifdef TE_PE
|
|
|
|
#define O_secrel O_md1
|
|
|
|
#define TC_DWARF2_EMIT_OFFSET tc_pe_dwarf2_emit_offset
|
|
void tc_pe_dwarf2_emit_offset (symbolS *, unsigned int);
|
|
|
|
#endif /* TE_PE */
|
|
|
|
/* X_add_symbol:X_op_symbol (Intel mode only) */
|
|
#define O_full_ptr O_md2
|
|
|
|
#ifdef OBJ_MACH_O
|
|
|
|
#define TC_FORCE_RELOCATION(FIX) (obj_mach_o_force_reloc (FIX))
|
|
|
|
#define TC_FORCE_RELOCATION_SUB_SAME(FIX,SEG) \
|
|
(obj_mach_o_force_reloc_sub_same (FIX, SEG))
|
|
|
|
#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX,SEG) \
|
|
(obj_mach_o_force_reloc_sub_local (FIX, SEG))
|
|
|
|
#define TC_VALIDATE_FIX_SUB(FIX, SEG) 1
|
|
|
|
#endif /* OBJ_MACH_O */
|
|
|
|
#endif /* TC_I386 */
|