aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-06-30 08:47:02 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-06-30 08:56:14 -0700
commitbbd19b19e44ee6f547291db62cba7150bb407a4c (patch)
tree5555d85949224754cd54693792aa2de599992727 /bfd
parenta1520ad8fc5c5c1932d69e4685836cc1375bd850 (diff)
downloadgdb-bbd19b19e44ee6f547291db62cba7150bb407a4c.zip
gdb-bbd19b19e44ee6f547291db62cba7150bb407a4c.tar.gz
gdb-bbd19b19e44ee6f547291db62cba7150bb407a4c.tar.bz2
Remove x86 NaCl target support
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog39
-rw-r--r--bfd/archures.c4
-rw-r--r--bfd/bfd-in2.h4
-rw-r--r--bfd/config.bfd20
-rwxr-xr-xbfd/configure13
-rw-r--r--bfd/configure.ac13
-rw-r--r--bfd/cpu-i386.c28
-rw-r--r--bfd/elf32-i386.c204
-rw-r--r--bfd/elf64-x86-64.c305
-rw-r--r--bfd/elfxx-x86.c10
-rw-r--r--bfd/targets.c6
11 files changed, 93 insertions, 553 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 80a800f..fa4799a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,42 @@
+2020-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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.
+
2020-06-29 H.J. Lu <hongjiu.lu@intel.com>
* elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Call
diff --git a/bfd/archures.c b/bfd/archures.c
index 1544b7b..551ec87 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -211,10 +211,6 @@ DESCRIPTION
. bfd_arch_k1om, {* Intel K1OM. *}
.#define bfd_mach_k1om (1 << 6)
.#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-.#define bfd_mach_i386_nacl (1 << 7)
-.#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-.#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-.#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
. bfd_arch_iamcu, {* Intel MCU. *}
.#define bfd_mach_iamcu (1 << 8)
.#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index fc3ed0c..35ef4d7 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1611,10 +1611,6 @@ enum bfd_architecture
bfd_arch_k1om, /* Intel K1OM. */
#define bfd_mach_k1om (1 << 6)
#define bfd_mach_k1om_intel_syntax (bfd_mach_k1om | bfd_mach_i386_intel_syntax)
-#define bfd_mach_i386_nacl (1 << 7)
-#define bfd_mach_i386_i386_nacl (bfd_mach_i386_i386 | bfd_mach_i386_nacl)
-#define bfd_mach_x86_64_nacl (bfd_mach_x86_64 | bfd_mach_i386_nacl)
-#define bfd_mach_x64_32_nacl (bfd_mach_x64_32 | bfd_mach_i386_nacl)
bfd_arch_iamcu, /* Intel MCU. */
#define bfd_mach_iamcu (1 << 8)
#define bfd_mach_i386_iamcu (bfd_mach_i386_i386 | bfd_mach_iamcu)
diff --git a/bfd/config.bfd b/bfd/config.bfd
index e19e4b3..2fa2acb 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -339,15 +339,11 @@ case "${targ}" in
;;
arm-*-nacl*)
targ_defvec=arm_elf32_nacl_le_vec
- targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec"
- targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec"
- targ_archs="$targ_archs bfd_i386_arch"
+ targ_selvecs="arm_elf32_nacl_be_vec"
;;
armeb-*-nacl*)
targ_defvec=arm_elf32_nacl_be_vec
- targ_selvecs="arm_elf32_nacl_le_vec i386_elf32_nacl_vec"
- targ64_selvecs="x86_64_elf32_nacl_vec x86_64_elf64_nacl_vec"
- targ_archs="$targ_archs bfd_i386_arch"
+ targ_selvecs="arm_elf32_nacl_le_vec"
;;
armeb-*-netbsdelf*)
targ_defvec=arm_elf32_be_vec
@@ -635,12 +631,6 @@ case "${targ}" in
targ_selvecs="iamcu_elf32_vec i386_pei_vec"
targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
;;
- i[3-7]86-*-nacl*)
- targ_defvec=i386_elf32_nacl_vec
- targ_selvecs="arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
- targ64_selvecs="x86_64_elf64_nacl_vec x86_64_elf32_nacl_vec"
- targ_archs="$targ_archs bfd_arm_arch"
- ;;
i[3-7]86-*-redox*)
targ_defvec=i386_elf32_vec
targ_selvecs=
@@ -691,12 +681,6 @@ case "${targ}" in
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
want64=true
;;
- x86_64-*-nacl*)
- targ_defvec=x86_64_elf32_nacl_vec
- targ_selvecs="i386_elf32_nacl_vec x86_64_elf64_nacl_vec arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
- targ_archs="$targ_archs bfd_arm_arch"
- want64=true
- ;;
x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin)
targ_defvec=x86_64_pe_vec
targ_selvecs="x86_64_pe_vec x86_64_pei_vec x86_64_pe_big_vec x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
diff --git a/bfd/configure b/bfd/configure
index c826751..155c8bd 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -14697,7 +14697,7 @@ coff="cofflink.lo $coffgen"
ecoff="ecofflink.lo $coffgen"
xcoff="xcofflink.lo $coffgen"
-elfxx_x86="elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo"
+elfxx_x86="elfxx-x86.lo elf-ifunc.lo elf-vxworks.lo"
for vec in $selvecs
do
target_size=32
@@ -14782,7 +14782,6 @@ do
i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
i386_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
- i386_elf32_nacl_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_elf32_sol2_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;;
@@ -14800,10 +14799,10 @@ do
ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
- k1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
- k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
- l1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
- l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ k1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ l1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
@@ -14963,11 +14962,9 @@ do
wasm32_elf32_vec) tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
x86_64_coff_vec) tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
x86_64_elf32_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo elf32.lo $elf"; target_size=64 ;;
- x86_64_elf32_nacl_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo elf32.lo $elf"; target_size=64 ;;
x86_64_elf64_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_elf64_cloudabi_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
- x86_64_elf64_nacl_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;;
x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
diff --git a/bfd/configure.ac b/bfd/configure.ac
index 1b67cb6..8e86f83 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -433,7 +433,7 @@ coff="cofflink.lo $coffgen"
ecoff="ecofflink.lo $coffgen"
xcoff="xcofflink.lo $coffgen"
-elfxx_x86="elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo"
+elfxx_x86="elfxx-x86.lo elf-ifunc.lo elf-vxworks.lo"
for vec in $selvecs
do
target_size=32
@@ -518,7 +518,6 @@ do
i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
i386_elf32_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
- i386_elf32_nacl_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_elf32_sol2_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo $elfxx_x86 elf32.lo $elf" ;;
i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;;
@@ -536,10 +535,10 @@ do
ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
- k1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
- k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
- l1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
- l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+ k1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ l1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
@@ -699,11 +698,9 @@ do
wasm32_elf32_vec) tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
x86_64_coff_vec) tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
x86_64_elf32_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo elf32.lo $elf"; target_size=64 ;;
- x86_64_elf32_nacl_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo elf32.lo $elf"; target_size=64 ;;
x86_64_elf64_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_elf64_cloudabi_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
- x86_64_elf64_nacl_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo $elfxx_x86 elf64.lo $elf"; target_size=64 ;;
x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;;
x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c
index 962252d..7b644c2 100644
--- a/bfd/cpu-i386.c
+++ b/bfd/cpu-i386.c
@@ -117,19 +117,6 @@ bfd_arch_i386_long_nop_fill (bfd_size_type count,
return bfd_arch_i386_fill (count, code, TRUE);
}
-/* Fill the buffer with zero, or one-byte nop instructions if CODE is TRUE. */
-
-static void *
-bfd_arch_i386_onebyte_nop_fill (bfd_size_type count,
- bfd_boolean is_bigendian ATTRIBUTE_UNUSED,
- bfd_boolean code)
-{
- void *fill = bfd_malloc (count);
- if (fill != NULL)
- memset (fill, code ? 0x90 : 0, count);
- return fill;
-}
-
#define N(BITS, MACH, NAME, PRINT, DEF, FILL, NEXT) \
{ BITS, /* Bits in a word. */ \
BITS, /* Bits in an address. */ \
@@ -148,22 +135,9 @@ bfd_arch_i386_onebyte_nop_fill (bfd_size_type count,
}
-static const bfd_arch_info_type bfd_x64_32_nacl_arch =
- N (64, bfd_mach_x64_32_nacl, "i386", "i386:x64-32:nacl",
- FALSE, bfd_arch_i386_onebyte_nop_fill, NULL);
-
-static const bfd_arch_info_type bfd_x86_64_nacl_arch =
- N (64, bfd_mach_x86_64_nacl, "i386", "i386:x86-64:nacl",
- FALSE, bfd_arch_i386_onebyte_nop_fill, &bfd_x64_32_nacl_arch);
-
-const bfd_arch_info_type bfd_i386_nacl_arch =
- N (32, bfd_mach_i386_i386_nacl, "i386", "i386:nacl",
- TRUE, bfd_arch_i386_onebyte_nop_fill, &bfd_x86_64_nacl_arch);
-
-
static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax =
N (64, bfd_mach_x64_32_intel_syntax, "i386:intel", "i386:x64-32:intel",
- FALSE, bfd_arch_i386_long_nop_fill, &bfd_i386_nacl_arch);
+ FALSE, bfd_arch_i386_long_nop_fill, NULL);
static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
N (64, bfd_mach_x86_64_intel_syntax, "i386:intel", "i386:x86-64:intel",
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 6f4f7f4..9045340 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -19,7 +19,6 @@
MA 02110-1301, USA. */
#include "elfxx-x86.h"
-#include "elf-nacl.h"
#include "elf-vxworks.h"
#include "dwarf2.h"
#include "opcode/i386.h"
@@ -4098,9 +4097,6 @@ elf_i386_output_arch_local_syms
return TRUE;
}
-/* Forward declaration. */
-static const struct elf_x86_lazy_plt_layout elf_i386_nacl_plt;
-
/* Similar to _bfd_elf_get_synthetic_symtab. Support PLTs with all
dynamic relocations. */
@@ -4159,9 +4155,6 @@ elf_i386_get_synthetic_symtab (bfd *abfd,
case is_vxworks:
lazy_plt = &elf_i386_lazy_plt;
break;
- case is_nacl:
- lazy_plt = &elf_i386_nacl_plt;
- break;
default:
abort ();
}
@@ -4327,13 +4320,6 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info)
init_table.lazy_ibt_plt = NULL;
init_table.non_lazy_ibt_plt = NULL;
break;
- case is_nacl:
- init_table.plt0_pad_byte = 0x90;
- init_table.lazy_plt = &elf_i386_nacl_plt;
- init_table.non_lazy_plt = NULL;
- init_table.lazy_ibt_plt = NULL;
- init_table.non_lazy_ibt_plt = NULL;
- break;
default:
abort ();
}
@@ -4591,196 +4577,6 @@ elf32_iamcu_elf_object_p (bfd *abfd)
#undef ELF_MACHINE_CODE
#define ELF_MACHINE_CODE EM_386
-/* Native Client support. */
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM i386_elf32_nacl_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-i386-nacl"
-#undef elf32_bed
-#define elf32_bed elf32_i386_nacl_bed
-
-#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x10000
-
-/* Restore defaults. */
-#undef ELF_OSABI
-#undef elf_backend_want_plt_sym
-#define elf_backend_want_plt_sym 0
-#undef elf_backend_static_tls_alignment
-
-/* NaCl uses substantially different PLT entries for the same effects. */
-
-#undef elf_backend_plt_alignment
-#define elf_backend_plt_alignment 5
-#define NACL_PLT_ENTRY_SIZE 64
-#define NACLMASK 0xe0 /* 32-byte alignment mask. */
-
-static const bfd_byte elf_i386_nacl_plt0_entry[] =
- {
- 0xff, 0x35, /* pushl contents of address */
- 0, 0, 0, 0, /* replaced with address of .got + 4. */
- 0x8b, 0x0d, /* movl contents of address, %ecx */
- 0, 0, 0, 0, /* replaced with address of .got + 8. */
- 0x83, 0xe1, NACLMASK, /* andl $NACLMASK, %ecx */
- 0xff, 0xe1 /* jmp *%ecx */
- };
-
-static const bfd_byte elf_i386_nacl_plt_entry[NACL_PLT_ENTRY_SIZE] =
- {
- 0x8b, 0x0d, /* movl contents of address, %ecx */
- 0, 0, 0, 0, /* replaced with GOT slot address. */
- 0x83, 0xe1, NACLMASK, /* andl $NACLMASK, %ecx */
- 0xff, 0xe1, /* jmp *%ecx */
-
- /* Pad to the next 32-byte boundary with nop instructions. */
- 0x90,
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
-
- /* Lazy GOT entries point here (32-byte aligned). */
- 0x68, /* pushl immediate */
- 0, 0, 0, 0, /* replaced with reloc offset. */
- 0xe9, /* jmp relative */
- 0, 0, 0, 0, /* replaced with offset to .plt. */
-
- /* Pad to the next 32-byte boundary with nop instructions. */
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90
- };
-
-static const bfd_byte
-elf_i386_nacl_pic_plt0_entry[sizeof (elf_i386_nacl_plt0_entry)] =
- {
- 0xff, 0x73, 0x04, /* pushl 4(%ebx) */
- 0x8b, 0x4b, 0x08, /* mov 0x8(%ebx), %ecx */
- 0x83, 0xe1, 0xe0, /* and $NACLMASK, %ecx */
- 0xff, 0xe1, /* jmp *%ecx */
-
- /* This is expected to be the same size as elf_i386_nacl_plt0_entry,
- so pad to that size with nop instructions. */
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90
- };
-
-static const bfd_byte elf_i386_nacl_pic_plt_entry[NACL_PLT_ENTRY_SIZE] =
- {
- 0x8b, 0x8b, /* movl offset(%ebx), %ecx */
- 0, 0, 0, 0, /* replaced with offset of this symbol in .got. */
- 0x83, 0xe1, 0xe0, /* andl $NACLMASK, %ecx */
- 0xff, 0xe1, /* jmp *%ecx */
-
- /* Pad to the next 32-byte boundary with nop instructions. */
- 0x90,
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
-
- /* Lazy GOT entries point here (32-byte aligned). */
- 0x68, /* pushl immediate */
- 0, 0, 0, 0, /* replaced with offset into relocation table. */
- 0xe9, /* jmp relative */
- 0, 0, 0, 0, /* replaced with offset to start of .plt. */
-
- /* Pad to the next 32-byte boundary with nop instructions. */
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
- 0x90, 0x90
- };
-
-static const bfd_byte elf_i386_nacl_eh_frame_plt[] =
- {
-#if (PLT_CIE_LENGTH != 20 \
- || PLT_FDE_LENGTH != 36 \
- || PLT_FDE_START_OFFSET != 4 + PLT_CIE_LENGTH + 8 \
- || PLT_FDE_LEN_OFFSET != 4 + PLT_CIE_LENGTH + 12)
-# error "Need PLT_CIE_LENGTH parameters for eh_frame_plt offsets!"
-#endif
- PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */
- 0, 0, 0, 0, /* CIE ID */
- 1, /* CIE version */
- 'z', 'R', 0, /* Augmentation string */
- 1, /* Code alignment factor */
- 0x7c, /* Data alignment factor: -4 */
- 8, /* Return address column */
- 1, /* Augmentation size */
- DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
- DW_CFA_def_cfa, 4, 4, /* DW_CFA_def_cfa: r4 (esp) ofs 4 */
- DW_CFA_offset + 8, 1, /* DW_CFA_offset: r8 (eip) at cfa-4 */
- DW_CFA_nop, DW_CFA_nop,
-
- PLT_FDE_LENGTH, 0, 0, 0, /* FDE length */
- PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */
- 0, 0, 0, 0, /* R_386_PC32 .plt goes here */
- 0, 0, 0, 0, /* .plt size goes here */
- 0, /* Augmentation size */
- DW_CFA_def_cfa_offset, 8, /* DW_CFA_def_cfa_offset: 8 */
- DW_CFA_advance_loc + 6, /* DW_CFA_advance_loc: 6 to __PLT__+6 */
- DW_CFA_def_cfa_offset, 12, /* DW_CFA_def_cfa_offset: 12 */
- DW_CFA_advance_loc + 58, /* DW_CFA_advance_loc: 58 to __PLT__+64 */
- DW_CFA_def_cfa_expression, /* DW_CFA_def_cfa_expression */
- 13, /* Block length */
- DW_OP_breg4, 4, /* DW_OP_breg4 (esp): 4 */
- DW_OP_breg8, 0, /* DW_OP_breg8 (eip): 0 */
- DW_OP_const1u, 63, DW_OP_and, DW_OP_const1u, 37, DW_OP_ge,
- DW_OP_lit2, DW_OP_shl, DW_OP_plus,
- DW_CFA_nop, DW_CFA_nop
- };
-
-static const struct elf_x86_lazy_plt_layout elf_i386_nacl_plt =
- {
- elf_i386_nacl_plt0_entry, /* plt0_entry */
- sizeof (elf_i386_nacl_plt0_entry), /* plt0_entry_size */
- elf_i386_nacl_plt_entry, /* plt_entry */
- NACL_PLT_ENTRY_SIZE, /* plt_entry_size */
- NULL, /* plt_tlsdesc_entry */
- 0, /* plt_tlsdesc_entry_size*/
- 0, /* plt_tlsdesc_got1_offset */
- 0, /* plt_tlsdesc_got2_offset */
- 0, /* plt_tlsdesc_got1_insn_end */
- 0, /* plt_tlsdesc_got2_insn_end */
- 2, /* plt0_got1_offset */
- 8, /* plt0_got2_offset */
- 0, /* plt0_got2_insn_end */
- 2, /* plt_got_offset */
- 33, /* plt_reloc_offset */
- 38, /* plt_plt_offset */
- 0, /* plt_got_insn_size */
- 0, /* plt_plt_insn_end */
- 32, /* plt_lazy_offset */
- elf_i386_nacl_pic_plt0_entry, /* pic_plt0_entry */
- elf_i386_nacl_pic_plt_entry, /* pic_plt_entry */
- elf_i386_nacl_eh_frame_plt, /* eh_frame_plt */
- sizeof (elf_i386_nacl_eh_frame_plt) /* eh_frame_plt_size */
- };
-
-static bfd_boolean
-elf32_i386_nacl_elf_object_p (bfd *abfd)
-{
- /* Set the right machine number for a NaCl i386 ELF32 file. */
- bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i386_nacl);
- return TRUE;
-}
-
-#undef ELF_TARGET_OS
-#define ELF_TARGET_OS is_nacl
-
-#undef elf_backend_object_p
-#define elf_backend_object_p elf32_i386_nacl_elf_object_p
-#undef elf_backend_modify_segment_map
-#define elf_backend_modify_segment_map nacl_modify_segment_map
-#undef elf_backend_modify_headers
-#define elf_backend_modify_headers nacl_modify_headers
-#undef elf_backend_final_write_processing
-#define elf_backend_final_write_processing nacl_final_write_processing
-
-#include "elf32-target.h"
-
-/* Restore defaults. */
-#undef elf_backend_object_p
-#undef elf_backend_modify_segment_map
-#undef elf_backend_modify_headers
-#undef elf_backend_final_write_processing
-
/* VxWorks support. */
#undef TARGET_LITTLE_SYM
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 8562f33..311fb28 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -20,7 +20,6 @@
MA 02110-1301, USA. */
#include "elfxx-x86.h"
-#include "elf-nacl.h"
#include "dwarf2.h"
#include "libiberty.h"
@@ -4744,9 +4743,6 @@ elf_x86_64_output_arch_local_syms
return TRUE;
}
-/* Forward declaration. */
-static const struct elf_x86_lazy_plt_layout elf_x86_64_nacl_plt;
-
/* Similar to _bfd_elf_get_synthetic_symtab. Support PLTs with all
dynamic relocations. */
@@ -4791,31 +4787,19 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd,
if (relsize <= 0)
return -1;
- if (get_elf_backend_data (abfd)->target_os != is_nacl)
+ lazy_plt = &elf_x86_64_lazy_plt;
+ non_lazy_plt = &elf_x86_64_non_lazy_plt;
+ lazy_bnd_plt = &elf_x86_64_lazy_bnd_plt;
+ non_lazy_bnd_plt = &elf_x86_64_non_lazy_bnd_plt;
+ if (ABI_64_P (abfd))
{
- lazy_plt = &elf_x86_64_lazy_plt;
- non_lazy_plt = &elf_x86_64_non_lazy_plt;
- lazy_bnd_plt = &elf_x86_64_lazy_bnd_plt;
- non_lazy_bnd_plt = &elf_x86_64_non_lazy_bnd_plt;
- if (ABI_64_P (abfd))
- {
- lazy_ibt_plt = &elf_x86_64_lazy_ibt_plt;
- non_lazy_ibt_plt = &elf_x86_64_non_lazy_ibt_plt;
- }
- else
- {
- lazy_ibt_plt = &elf_x32_lazy_ibt_plt;
- non_lazy_ibt_plt = &elf_x32_non_lazy_ibt_plt;
- }
+ lazy_ibt_plt = &elf_x86_64_lazy_ibt_plt;
+ non_lazy_ibt_plt = &elf_x86_64_non_lazy_ibt_plt;
}
else
{
- lazy_plt = &elf_x86_64_nacl_plt;
- non_lazy_plt = NULL;
- lazy_bnd_plt = NULL;
- non_lazy_bnd_plt = NULL;
- lazy_ibt_plt = NULL;
- non_lazy_ibt_plt = NULL;
+ lazy_ibt_plt = &elf_x32_lazy_ibt_plt;
+ non_lazy_ibt_plt = &elf_x32_non_lazy_ibt_plt;
}
count = 0;
@@ -5130,6 +5114,8 @@ static bfd *
elf_x86_64_link_setup_gnu_properties (struct bfd_link_info *info)
{
struct elf_x86_init_table init_table;
+ const struct elf_backend_data *bed;
+ struct elf_x86_link_hash_table *htab;
if ((int) R_X86_64_standard >= (int) R_X86_64_converted_reloc_bit
|| (int) R_X86_64_max <= (int) R_X86_64_converted_reloc_bit
@@ -5142,42 +5128,30 @@ elf_x86_64_link_setup_gnu_properties (struct bfd_link_info *info)
/* This is unused for x86-64. */
init_table.plt0_pad_byte = 0x90;
- if (get_elf_backend_data (info->output_bfd)->target_os != is_nacl)
+ bed = get_elf_backend_data (info->output_bfd);
+ htab = elf_x86_hash_table (info, bed->target_id);
+ if (!htab)
+ abort ();
+ if (htab->params->bndplt)
{
- const struct elf_backend_data *bed
- = get_elf_backend_data (info->output_bfd);
- struct elf_x86_link_hash_table *htab
- = elf_x86_hash_table (info, bed->target_id);
- if (!htab)
- abort ();
- if (htab->params->bndplt)
- {
- init_table.lazy_plt = &elf_x86_64_lazy_bnd_plt;
- init_table.non_lazy_plt = &elf_x86_64_non_lazy_bnd_plt;
- }
- else
- {
- init_table.lazy_plt = &elf_x86_64_lazy_plt;
- init_table.non_lazy_plt = &elf_x86_64_non_lazy_plt;
- }
+ init_table.lazy_plt = &elf_x86_64_lazy_bnd_plt;
+ init_table.non_lazy_plt = &elf_x86_64_non_lazy_bnd_plt;
+ }
+ else
+ {
+ init_table.lazy_plt = &elf_x86_64_lazy_plt;
+ init_table.non_lazy_plt = &elf_x86_64_non_lazy_plt;
+ }
- if (ABI_64_P (info->output_bfd))
- {
- init_table.lazy_ibt_plt = &elf_x86_64_lazy_ibt_plt;
- init_table.non_lazy_ibt_plt = &elf_x86_64_non_lazy_ibt_plt;
- }
- else
- {
- init_table.lazy_ibt_plt = &elf_x32_lazy_ibt_plt;
- init_table.non_lazy_ibt_plt = &elf_x32_non_lazy_ibt_plt;
- }
+ if (ABI_64_P (info->output_bfd))
+ {
+ init_table.lazy_ibt_plt = &elf_x86_64_lazy_ibt_plt;
+ init_table.non_lazy_ibt_plt = &elf_x86_64_non_lazy_ibt_plt;
}
else
{
- init_table.lazy_plt = &elf_x86_64_nacl_plt;
- init_table.non_lazy_plt = NULL;
- init_table.lazy_ibt_plt = NULL;
- init_table.non_lazy_ibt_plt = NULL;
+ init_table.lazy_ibt_plt = &elf_x32_lazy_ibt_plt;
+ init_table.non_lazy_ibt_plt = &elf_x32_non_lazy_ibt_plt;
}
if (ABI_64_P (info->output_bfd))
@@ -5364,30 +5338,6 @@ elf64_x86_64_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUS
#include "elf64-target.h"
-/* Native Client support. */
-
-static bfd_boolean
-elf64_x86_64_nacl_elf_object_p (bfd *abfd)
-{
- /* Set the right machine number for a NaCl x86-64 ELF64 file. */
- bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64_nacl);
- return TRUE;
-}
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM x86_64_elf64_nacl_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf64-x86-64-nacl"
-#undef elf64_bed
-#define elf64_bed elf64_x86_64_nacl_bed
-
-#undef ELF_MAXPAGESIZE
-#undef ELF_MINPAGESIZE
-#undef ELF_COMMONPAGESIZE
-#define ELF_MAXPAGESIZE 0x10000
-#define ELF_MINPAGESIZE 0x10000
-#define ELF_COMMONPAGESIZE 0x10000
-
/* Restore defaults. */
#undef ELF_OSABI
#undef elf_backend_static_tls_alignment
@@ -5396,188 +5346,6 @@ elf64_x86_64_nacl_elf_object_p (bfd *abfd)
#undef elf_backend_strtab_flags
#undef elf_backend_copy_special_section_fields
-/* NaCl uses substantially different PLT entries for the same effects. */
-
-#undef elf_backend_plt_alignment
-#define elf_backend_plt_alignment 5
-#define NACL_PLT_ENTRY_SIZE 64
-#define NACLMASK 0xe0 /* 32-byte alignment mask. */
-
-static const bfd_byte elf_x86_64_nacl_plt0_entry[NACL_PLT_ENTRY_SIZE] =
- {
- 0xff, 0x35, 8, 0, 0, 0, /* pushq GOT+8(%rip) */
- 0x4c, 0x8b, 0x1d, 16, 0, 0, 0, /* mov GOT+16(%rip), %r11 */
- 0x41, 0x83, 0xe3, NACLMASK, /* and $-32, %r11d */
- 0x4d, 0x01, 0xfb, /* add %r15, %r11 */
- 0x41, 0xff, 0xe3, /* jmpq *%r11 */
-
- /* 9-byte nop sequence to pad out to the next 32-byte boundary. */
- 0x66, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw 0x0(%rax,%rax,1) */
-
- /* 32 bytes of nop to pad out to the standard size. */
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, /* excess data16 prefixes */
- 0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, /* excess data16 prefixes */
- 0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
- 0x66, /* excess data16 prefix */
- 0x90 /* nop */
- };
-
-static const bfd_byte elf_x86_64_nacl_plt_entry[NACL_PLT_ENTRY_SIZE] =
- {
- 0x4c, 0x8b, 0x1d, 0, 0, 0, 0, /* mov name@GOTPCREL(%rip),%r11 */
- 0x41, 0x83, 0xe3, NACLMASK, /* and $-32, %r11d */
- 0x4d, 0x01, 0xfb, /* add %r15, %r11 */
- 0x41, 0xff, 0xe3, /* jmpq *%r11 */
-
- /* 15-byte nop sequence to pad out to the next 32-byte boundary. */
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, /* excess data16 prefixes */
- 0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
-
- /* Lazy GOT entries point here (32-byte aligned). */
- 0x68, /* pushq immediate */
- 0, 0, 0, 0, /* replaced with index into relocation table. */
- 0xe9, /* jmp relative */
- 0, 0, 0, 0, /* replaced with offset to start of .plt0. */
-
- /* 22 bytes of nop to pad out to the standard size. */
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, /* excess data16 prefixes */
- 0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
- 0x0f, 0x1f, 0x80, 0, 0, 0, 0, /* nopl 0x0(%rax) */
- };
-
-/* .eh_frame covering the .plt section. */
-
-static const bfd_byte elf_x86_64_nacl_eh_frame_plt[] =
- {
-#if (PLT_CIE_LENGTH != 20 \
- || PLT_FDE_LENGTH != 36 \
- || PLT_FDE_START_OFFSET != 4 + PLT_CIE_LENGTH + 8 \
- || PLT_FDE_LEN_OFFSET != 4 + PLT_CIE_LENGTH + 12)
-# error "Need PLT_CIE_LENGTH parameters for eh_frame_plt offsets!"
-#endif
- PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */
- 0, 0, 0, 0, /* CIE ID */
- 1, /* CIE version */
- 'z', 'R', 0, /* Augmentation string */
- 1, /* Code alignment factor */
- 0x78, /* Data alignment factor */
- 16, /* Return address column */
- 1, /* Augmentation size */
- DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */
- DW_CFA_def_cfa, 7, 8, /* DW_CFA_def_cfa: r7 (rsp) ofs 8 */
- DW_CFA_offset + 16, 1, /* DW_CFA_offset: r16 (rip) at cfa-8 */
- DW_CFA_nop, DW_CFA_nop,
-
- PLT_FDE_LENGTH, 0, 0, 0, /* FDE length */
- PLT_CIE_LENGTH + 8, 0, 0, 0,/* CIE pointer */
- 0, 0, 0, 0, /* R_X86_64_PC32 .plt goes here */
- 0, 0, 0, 0, /* .plt size goes here */
- 0, /* Augmentation size */
- DW_CFA_def_cfa_offset, 16, /* DW_CFA_def_cfa_offset: 16 */
- DW_CFA_advance_loc + 6, /* DW_CFA_advance_loc: 6 to __PLT__+6 */
- DW_CFA_def_cfa_offset, 24, /* DW_CFA_def_cfa_offset: 24 */
- DW_CFA_advance_loc + 58, /* DW_CFA_advance_loc: 58 to __PLT__+64 */
- DW_CFA_def_cfa_expression, /* DW_CFA_def_cfa_expression */
- 13, /* Block length */
- DW_OP_breg7, 8, /* DW_OP_breg7 (rsp): 8 */
- DW_OP_breg16, 0, /* DW_OP_breg16 (rip): 0 */
- DW_OP_const1u, 63, DW_OP_and, DW_OP_const1u, 37, DW_OP_ge,
- DW_OP_lit3, DW_OP_shl, DW_OP_plus,
- DW_CFA_nop, DW_CFA_nop
- };
-
-static const struct elf_x86_lazy_plt_layout elf_x86_64_nacl_plt =
- {
- elf_x86_64_nacl_plt0_entry, /* plt0_entry */
- NACL_PLT_ENTRY_SIZE, /* plt0_entry_size */
- elf_x86_64_nacl_plt_entry, /* plt_entry */
- NACL_PLT_ENTRY_SIZE, /* plt_entry_size */
- elf_x86_64_nacl_plt0_entry, /* plt_tlsdesc_entry */
- NACL_PLT_ENTRY_SIZE, /* plt_tlsdesc_entry_size */
- 2, /* plt_tlsdesc_got1_offset */
- 9, /* plt_tlsdesc_got2_offset */
- 6, /* plt_tlsdesc_got1_insn_end */
- 13, /* plt_tlsdesc_got2_insn_end */
- 2, /* plt0_got1_offset */
- 9, /* plt0_got2_offset */
- 13, /* plt0_got2_insn_end */
- 3, /* plt_got_offset */
- 33, /* plt_reloc_offset */
- 38, /* plt_plt_offset */
- 7, /* plt_got_insn_size */
- 42, /* plt_plt_insn_end */
- 32, /* plt_lazy_offset */
- elf_x86_64_nacl_plt0_entry, /* pic_plt0_entry */
- elf_x86_64_nacl_plt_entry, /* pic_plt_entry */
- elf_x86_64_nacl_eh_frame_plt, /* eh_frame_plt */
- sizeof (elf_x86_64_nacl_eh_frame_plt) /* eh_frame_plt_size */
- };
-
-#undef ELF_TARGET_OS
-#define ELF_TARGET_OS is_nacl
-
-#undef elf_backend_object_p
-#define elf_backend_object_p elf64_x86_64_nacl_elf_object_p
-#undef elf_backend_modify_segment_map
-#define elf_backend_modify_segment_map nacl_modify_segment_map
-#undef elf_backend_modify_headers
-#define elf_backend_modify_headers nacl_modify_headers
-#undef elf_backend_final_write_processing
-#define elf_backend_final_write_processing nacl_final_write_processing
-
-#include "elf64-target.h"
-
-/* Native Client x32 support. */
-
-static bfd_boolean
-elf32_x86_64_nacl_elf_object_p (bfd *abfd)
-{
- /* Set the right machine number for a NaCl x86-64 ELF32 file. */
- bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x64_32_nacl);
- return TRUE;
-}
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM x86_64_elf32_nacl_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-x86-64-nacl"
-#undef elf32_bed
-#define elf32_bed elf32_x86_64_nacl_bed
-
-#define bfd_elf32_bfd_reloc_type_lookup \
- elf_x86_64_reloc_type_lookup
-#define bfd_elf32_bfd_reloc_name_lookup \
- elf_x86_64_reloc_name_lookup
-#define bfd_elf32_get_synthetic_symtab \
- elf_x86_64_get_synthetic_symtab
-
-#undef elf_backend_object_p
-#define elf_backend_object_p \
- elf32_x86_64_nacl_elf_object_p
-
-#undef elf_backend_bfd_from_remote_memory
-#define elf_backend_bfd_from_remote_memory \
- _bfd_elf32_bfd_from_remote_memory
-
-#undef elf_backend_size_info
-#define elf_backend_size_info \
- _bfd_elf32_size_info
-
-#undef elf32_bed
-#define elf32_bed elf32_x86_64_bed
-
-#include "elf32-target.h"
-
-/* Restore defaults. */
-#undef elf_backend_object_p
-#define elf_backend_object_p elf64_x86_64_elf_object_p
-#undef elf_backend_bfd_from_remote_memory
-#undef elf_backend_size_info
-#undef elf_backend_modify_segment_map
-#undef elf_backend_modify_headers
-#undef elf_backend_final_write_processing
-
/* Intel L1OM support. */
static bfd_boolean
@@ -5666,11 +5434,6 @@ elf64_k1om_elf_object_p (bfd *abfd)
#undef elf_backend_object_p
#define elf_backend_object_p elf64_k1om_elf_object_p
-#undef elf_backend_static_tls_alignment
-
-#undef elf_backend_want_plt_sym
-#define elf_backend_want_plt_sym 0
-
#include "elf64-target.h"
/* FreeBSD K1OM support. */
@@ -5695,6 +5458,7 @@ elf64_k1om_elf_object_p (bfd *abfd)
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-x86-64"
#undef elf32_bed
+#define elf32_bed elf32_x86_64_bed
#undef ELF_ARCH
#define ELF_ARCH bfd_arch_i386
@@ -5704,6 +5468,13 @@ elf64_k1om_elf_object_p (bfd *abfd)
#undef ELF_OSABI
+#define bfd_elf32_bfd_reloc_type_lookup \
+ elf_x86_64_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup \
+ elf_x86_64_reloc_name_lookup
+#define bfd_elf32_get_synthetic_symtab \
+ elf_x86_64_get_synthetic_symtab
+
#undef elf_backend_object_p
#define elf_backend_object_p \
elf32_x86_64_elf_object_p
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 5b1793a..e58ddc1 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -2795,9 +2795,6 @@ _bfd_x86_elf_link_setup_gnu_properties
htab->interp = s;
}
- /* Don't change PLT section alignment for NaCl since it uses
- 64-byte PLT entry and sets PLT section alignment to 32
- bytes. Don't create additional PLT sections for NaCl. */
if (normal_target)
{
flagword pltflags = (bed->dynamic_sec_flags
@@ -2831,8 +2828,7 @@ _bfd_x86_elf_link_setup_gnu_properties
if (use_ibt_plt)
{
/* Create the second PLT for Intel IBT support. IBT
- PLT is supported only for non-NaCl target and is
- is needed only for lazy binding. */
+ PLT is needed only for lazy binding. */
sec = bfd_make_section_anyway_with_flags (dynobj,
".plt.sec",
pltflags);
@@ -2845,8 +2841,8 @@ _bfd_x86_elf_link_setup_gnu_properties
else if (htab->params->bndplt && ABI_64_P (dynobj))
{
/* Create the second PLT for Intel MPX support. MPX
- PLT is supported only for non-NaCl target in 64-bit
- mode and is needed only for lazy binding. */
+ PLT is supported only in 64-bit mode and is needed
+ only for lazy binding. */
sec = bfd_make_section_anyway_with_flags (dynobj,
".plt.sec",
pltflags);
diff --git a/bfd/targets.c b/bfd/targets.c
index d95c0aa..0732c5e 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -736,7 +736,6 @@ extern const bfd_target i386_coff_go32stubbed_vec;
extern const bfd_target i386_coff_lynx_vec;
extern const bfd_target i386_elf32_vec;
extern const bfd_target i386_elf32_fbsd_vec;
-extern const bfd_target i386_elf32_nacl_vec;
extern const bfd_target i386_elf32_sol2_vec;
extern const bfd_target i386_elf32_vxworks_vec;
extern const bfd_target i386_mach_o_vec;
@@ -918,11 +917,9 @@ extern const bfd_target wasm_vec;
extern const bfd_target wasm32_elf32_vec;
extern const bfd_target x86_64_coff_vec;
extern const bfd_target x86_64_elf32_vec;
-extern const bfd_target x86_64_elf32_nacl_vec;
extern const bfd_target x86_64_elf64_vec;
extern const bfd_target x86_64_elf64_cloudabi_vec;
extern const bfd_target x86_64_elf64_fbsd_vec;
-extern const bfd_target x86_64_elf64_nacl_vec;
extern const bfd_target x86_64_elf64_sol2_vec;
extern const bfd_target x86_64_mach_o_vec;
extern const bfd_target x86_64_pe_vec;
@@ -1085,7 +1082,6 @@ static const bfd_target * const _bfd_target_vector[] =
&i386_coff_lynx_vec,
&i386_elf32_vec,
&i386_elf32_fbsd_vec,
- &i386_elf32_nacl_vec,
&i386_elf32_sol2_vec,
&i386_elf32_vxworks_vec,
&i386_mach_o_vec,
@@ -1335,11 +1331,9 @@ static const bfd_target * const _bfd_target_vector[] =
#ifdef BFD64
&x86_64_coff_vec,
&x86_64_elf32_vec,
- &x86_64_elf32_nacl_vec,
&x86_64_elf64_vec,
&x86_64_elf64_cloudabi_vec,
&x86_64_elf64_fbsd_vec,
- &x86_64_elf64_nacl_vec,
&x86_64_elf64_sol2_vec,
&x86_64_mach_o_vec,
&x86_64_pe_vec,