aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog31
-rw-r--r--bfd/Makefile.am6
-rw-r--r--bfd/Makefile.in6
-rw-r--r--bfd/archures.c5
-rw-r--r--bfd/bfd-in2.h3
-rw-r--r--bfd/config.bfd31
-rwxr-xr-xbfd/configure2
-rw-r--r--bfd/configure.in2
-rw-r--r--bfd/cpu-l1om.c56
-rw-r--r--bfd/elf64-x86-64.c50
-rw-r--r--bfd/targets.c4
11 files changed, 184 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a4e8714..4ea2346 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,34 @@
+2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * archures.c (bfd_architecture): Add bfd_arch_l1om.
+ (bfd_l1om_arch): New.
+ (bfd_archures_list): Add &bfd_l1om_arch.
+ * bfd-in2.h: Regenerated.
+
+ * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
+ bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
+ if bfd_elf64_x86_64_freebsd_vec is supported.
+ (targ_selvecs): Likewise.
+
+ * configure.in: Support bfd_elf64_l1om_vec and
+ bfd_elf64_l1om_freebsd_vec.
+ * configure: Regenerated.
+
+ * cpu-l1om.c: New.
+
+ * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
+ (bfd_elf64_l1om_vec): Likewise.
+ (bfd_elf64_l1om_freebsd_vec): Likewise.
+
+ * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
+ (ALL_MACHINES_CFILES): Add cpu-l1om.c.
+ * Makefile.in: Regenerated.
+
+ * targets.c (bfd_elf64_l1om_vec): New.
+ (bfd_elf64_l1om_freebsd_vec): Likewise.
+ (_bfd_target_vector): Add bfd_elf64_l1om_vec and
+ bfd_elf64_l1om_freebsd_vec.
+
2009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
Alan Modra <amodra@bigpond.net.au>
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 5561964..73ff953 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -83,6 +83,7 @@ ALL_MACHINES = \
cpu-hppa.lo \
cpu-i370.lo \
cpu-i386.lo \
+ cpu-l1om.lo \
cpu-i860.lo \
cpu-i960.lo \
cpu-ia64.lo \
@@ -152,6 +153,7 @@ ALL_MACHINES_CFILES = \
cpu-hppa.c \
cpu-i370.c \
cpu-i386.c \
+ cpu-l1om.c \
cpu-i860.c \
cpu-i960.c \
cpu-ia64.c \
@@ -1309,6 +1311,10 @@ cpu-i386.lo: \
cpu-i386.c \
$(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h
+cpu-l1om.lo: \
+ cpu-l1om.c \
+ $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
cpu-i860.lo: \
cpu-i860.c \
$(INCDIR)/filenames.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 913a9df..65f94e8 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -353,6 +353,7 @@ ALL_MACHINES = \
cpu-hppa.lo \
cpu-i370.lo \
cpu-i386.lo \
+ cpu-l1om.lo \
cpu-i860.lo \
cpu-i960.lo \
cpu-ia64.lo \
@@ -422,6 +423,7 @@ ALL_MACHINES_CFILES = \
cpu-hppa.c \
cpu-i370.c \
cpu-i386.c \
+ cpu-l1om.c \
cpu-i860.c \
cpu-i960.c \
cpu-ia64.c \
@@ -1910,6 +1912,10 @@ cpu-i386.lo: \
cpu-i386.c \
$(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h
+cpu-l1om.lo: \
+ cpu-l1om.c \
+ $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h
cpu-i860.lo: \
cpu-i860.c \
$(INCDIR)/filenames.h \
diff --git a/bfd/archures.c b/bfd/archures.c
index 9e84b88..6085b0f 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -186,6 +186,9 @@ DESCRIPTION
.#define bfd_mach_i386_i386_intel_syntax 3
.#define bfd_mach_x86_64 64
.#define bfd_mach_x86_64_intel_syntax 65
+. bfd_arch_l1om, {* Intel L1OM *}
+.#define bfd_mach_l1om 66
+.#define bfd_mach_l1om_intel_syntax 67
. bfd_arch_we32k, {* AT&T WE32xxx *}
. bfd_arch_tahoe, {* CCI/Harris Tahoe *}
. bfd_arch_i860, {* Intel 860 *}
@@ -476,6 +479,7 @@ extern const bfd_arch_info_type bfd_h8500_arch;
extern const bfd_arch_info_type bfd_hppa_arch;
extern const bfd_arch_info_type bfd_i370_arch;
extern const bfd_arch_info_type bfd_i386_arch;
+extern const bfd_arch_info_type bfd_l1om_arch;
extern const bfd_arch_info_type bfd_i860_arch;
extern const bfd_arch_info_type bfd_i960_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
@@ -550,6 +554,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_hppa_arch,
&bfd_i370_arch,
&bfd_i386_arch,
+ &bfd_l1om_arch,
&bfd_i860_arch,
&bfd_i960_arch,
&bfd_ia64_arch,
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 6dff90b..f3f1cba 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1835,6 +1835,9 @@ enum bfd_architecture
#define bfd_mach_i386_i386_intel_syntax 3
#define bfd_mach_x86_64 64
#define bfd_mach_x86_64_intel_syntax 65
+ bfd_arch_l1om, /* Intel L1OM */
+#define bfd_mach_l1om 66
+#define bfd_mach_l1om_intel_syntax 67
bfd_arch_we32k, /* AT&T WE32xxx */
bfd_arch_tahoe, /* CCI/Harris Tahoe */
bfd_arch_i860, /* Intel 860 */
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 990e1b7..b95079f 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -500,13 +500,13 @@ case "${targ}" in
i[3-7]86-*-solaris2*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
- targ64_selvecs=bfd_elf64_x86_64_vec
+ targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
want64=true
;;
#ifdef BFD64
x86_64-*-solaris2*)
targ_defvec=bfd_elf32_i386_vec
- targ_selvecs="bfd_elf64_x86_64_vec i386coff_vec"
+ targ_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec i386coff_vec"
want64=true
;;
#endif
@@ -526,7 +526,7 @@ case "${targ}" in
;;
i[3-7]86-*-dicos*)
targ_defvec=bfd_elf32_i386_vec
- targ64_selvecs=bfd_elf64_x86_64_vec
+ targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
;;
*-*-msdosdjgpp* | *-*-go32* )
targ_defvec=go32coff_vec
@@ -562,7 +562,7 @@ case "${targ}" in
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
targ_defvec=bfd_elf32_i386_freebsd_vec
targ_selvecs="bfd_elf32_i386_vec i386pei_vec i386coff_vec"
- targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec"
+ targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec"
# FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
case "${targ}" in
i[3-7]86-*-freebsd3* | i[3-7]86-*-freebsd4 | i[3-7]86-*-freebsd4.0*)
@@ -572,7 +572,7 @@ case "${targ}" in
i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
- targ64_selvecs=bfd_elf64_x86_64_vec
+ targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
;;
i[3-7]86-*-netbsdpe*)
targ_defvec=i386pe_vec
@@ -600,7 +600,7 @@ case "${targ}" in
i[3-7]86-*-linux-*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386linux_vec i386pei_vec"
- targ64_selvecs=bfd_elf64_x86_64_vec
+ targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
;;
#ifdef BFD64
x86_64-*-darwin*)
@@ -611,32 +611,32 @@ case "${targ}" in
;;
x86_64-*-dicos*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec"
+ targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec"
want64=true
;;
x86_64-*-elf*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386coff_vec"
+ targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec i386coff_vec"
want64=true
;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_x86_64_freebsd_vec
- targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec"
+ targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec"
want64=true
;;
x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec i386pei_vec x86_64pei_vec"
+ targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec"
want64=true
;;
x86_64-*-linux-*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386linux_vec i386pei_vec x86_64pei_vec"
+ targ_selvecs="bfd_elf32_i386_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec"
want64=true
;;
x86_64-*-mingw*)
targ_defvec=x86_64pe_vec
- targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec"
+ targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec"
want64=true
targ_underscore=yes
;;
@@ -1573,3 +1573,10 @@ case "${targ_defvec} ${targ_selvecs}" in
targ_selvecs="${targ_selvecs} bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec"
;;
esac
+
+# If we support Intel L1OM target, then add support for bfd_l1om_arch.
+case "${targ_defvec} ${targ_selvecs}" in
+ *bfd_elf64_l1om_vec*)
+ targ_archs="$targ_archs bfd_l1om_arch"
+ ;;
+esac
diff --git a/bfd/configure b/bfd/configure
index 91fbd0d..052631f 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -21323,6 +21323,8 @@ do
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
diff --git a/bfd/configure.in b/bfd/configure.in
index 11cc83a..4325200 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -827,6 +827,8 @@ do
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
diff --git a/bfd/cpu-l1om.c b/bfd/cpu-l1om.c
new file mode 100644
index 0000000..e1db709
--- /dev/null
+++ b/bfd/cpu-l1om.c
@@ -0,0 +1,56 @@
+/* BFD support for the Intel L1OM architecture.
+ Copyright 2009
+ Free Software Foundation, Inc.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program 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 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+static const bfd_arch_info_type bfd_l1om_arch_intel_syntax =
+{
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_l1om,
+ bfd_mach_l1om_intel_syntax,
+ "l1om:intel",
+ "l1om:intel",
+ 3,
+ TRUE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ 0
+};
+
+const bfd_arch_info_type bfd_l1om_arch =
+{
+ 64, /* 32 bits in a word */
+ 64, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_l1om,
+ bfd_mach_l1om,
+ "l1om",
+ "l1om",
+ 3,
+ TRUE,
+ bfd_default_compatible,
+ bfd_default_scan,
+ &bfd_l1om_arch_intel_syntax
+};
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 2364233..77dedc5 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -4483,3 +4483,53 @@ static const struct bfd_elf_special_section
#define elf64_bed elf64_x86_64_fbsd_bed
#include "elf64-target.h"
+
+/* Intel L1OM support. */
+
+static bfd_boolean
+elf64_l1om_elf_object_p (bfd *abfd)
+{
+ /* Set the right machine number for an L1OM elf64 file. */
+ bfd_default_set_arch_mach (abfd, bfd_arch_l1om, bfd_mach_l1om);
+ return TRUE;
+}
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf64_l1om_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf64-l1om"
+#undef ELF_ARCH
+#define ELF_ARCH bfd_arch_l1om
+
+#undef ELF_MACHINE_CODE
+#define ELF_MACHINE_CODE EM_L1OM
+
+#undef ELF_OSABI
+
+#undef elf64_bed
+#define elf64_bed elf64_l1om_bed
+
+#undef elf_backend_object_p
+#define elf_backend_object_p elf64_l1om_elf_object_p
+
+#undef elf_backend_post_process_headers
+
+#include "elf64-target.h"
+
+/* FreeBSD L1OM support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf64_l1om_freebsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf64-l1om-freebsd"
+
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_FREEBSD
+
+#undef elf64_bed
+#define elf64_bed elf64_l1om_fbsd_bed
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers _bfd_elf_set_osabi
+
+#include "elf64-target.h"
diff --git a/bfd/targets.c b/bfd/targets.c
index ba56a44..1e5d244 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -698,6 +698,8 @@ extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
extern const bfd_target bfd_elf64_x86_64_vec;
+extern const bfd_target bfd_elf64_l1om_freebsd_vec;
+extern const bfd_target bfd_elf64_l1om_vec;
extern const bfd_target bfd_mmo_vec;
extern const bfd_target bfd_powerpc_pe_vec;
extern const bfd_target bfd_powerpc_pei_vec;
@@ -1037,6 +1039,8 @@ static const bfd_target * const _bfd_target_vector[] =
&bfd_elf64_tradlittlemips_vec,
&bfd_elf64_x86_64_freebsd_vec,
&bfd_elf64_x86_64_vec,
+ &bfd_elf64_l1om_freebsd_vec,
+ &bfd_elf64_l1om_vec,
&bfd_mmo_vec,
#endif
&bfd_powerpc_pe_vec,