aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2015-10-29 13:49:03 +0000
committerNick Clifton <nickc@redhat.com>2015-10-29 13:49:03 +0000
commita75cf613fd7d0a48d526a996ff5c250c599d3ab7 (patch)
treee0846d4a3587824b62dfbf158da6177cf7138609 /bfd
parent968bc5cc86bff4ebf89e63bf99db7c7e777d4756 (diff)
downloadgdb-a75cf613fd7d0a48d526a996ff5c250c599d3ab7.zip
gdb-a75cf613fd7d0a48d526a996ff5c250c599d3ab7.tar.gz
gdb-a75cf613fd7d0a48d526a996ff5c250c599d3ab7.tar.bz2
Add support for AArch64 CloudABI binaries.
ld * Makefile.am (ALL_64_EMULATION_SOURCES): Add support for CloudABI on aarch64. For this target we have to make sure we use ELFOSABI_CLOUDABI instead of ELFOSABI_NONE. * configure.tgt (targ_emul): Likewise. * emulparams/aarch64cloudabi.sh: New file. * emulparams/aarch64cloudabib.sh: New file. * Makefile.in: Regenerate. bfd * config.bfd (targ_defvec): Add support for CloudABI on aarch64. For this target we have to make sure we use ELFOSABI_CLOUDABI instead of ELFOSABI_NONE. * configure.ac (tb): Likewise. * elfnn-aarch64.c: Likewise. * targets.c (_bfd_target_vector): Likewise. * configure: Regenerate. gas * config/tc-aarch64.c (elf64_aarch64_target_format): Select the cloudabi format if the TARGET_OS is cloudabi.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog10
-rw-r--r--bfd/config.bfd5
-rwxr-xr-xbfd/configure2
-rw-r--r--bfd/configure.ac6
-rw-r--r--bfd/elfnn-aarch64.c19
-rw-r--r--bfd/targets.c4
6 files changed, 44 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cedcead..41cfcbe 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2015-10-29 Ed Schouten <ed@nuxi.nl>
+
+ * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
+ For this target we have to make sure we use ELFOSABI_CLOUDABI
+ instead of ELFOSABI_NONE.
+ * configure.ac (tb): Likewise.
+ * elfnn-aarch64.c: Likewise.
+ * targets.c (_bfd_target_vector): Likewise.
+ * configure: Regenerate.
+
2015-10-29 Pedro Alves <palves@redhat.com>
* libhppa.h (bfd_hppa_insn2fmt): Add cast.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index fe43153..c5688cb 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -184,6 +184,11 @@ case "${targ}" in
targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
want64=true
;;
+ aarch64-*-cloudabi*)
+ targ_defvec=aarch64_elf64_le_cloudabi_vec
+ targ_selvecs=aarch64_elf64_be_cloudabi_vec
+ want64=true
+ ;;
aarch64-*-linux*)
targ_defvec=aarch64_elf64_le_vec
targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
diff --git a/bfd/configure b/bfd/configure
index 0308aa5..58388fe 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -15250,7 +15250,9 @@ do
aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
diff --git a/bfd/configure.ac b/bfd/configure.ac
index cc446e1..6f5e85f 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -695,8 +695,10 @@ do
# use one entry per line, even though this leads to long lines.
aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
- aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
- aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+ aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index f3489d5..5558bf7 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -9385,3 +9385,22 @@ const struct elf_size_info elfNN_aarch64_size_info =
#define elf_backend_obj_attrs_section ".ARM.attributes"
#include "elfNN-target.h"
+
+/* CloudABI support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM aarch64_elfNN_le_cloudabi_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elfNN-littleaarch64-cloudabi"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM aarch64_elfNN_be_cloudabi_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elfNN-bigaarch64-cloudabi"
+
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_CLOUDABI
+
+#undef elfNN_bed
+#define elfNN_bed elfNN_aarch64_cloudabi_bed
+
+#include "elfNN-target.h"
diff --git a/bfd/targets.c b/bfd/targets.c
index 19469bc..51f2198 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -568,7 +568,9 @@ to find an alternative output format that is suitable.
extern const bfd_target aarch64_elf32_be_vec;
extern const bfd_target aarch64_elf32_le_vec;
extern const bfd_target aarch64_elf64_be_vec;
+extern const bfd_target aarch64_elf64_be_cloudabi_vec;
extern const bfd_target aarch64_elf64_le_vec;
+extern const bfd_target aarch64_elf64_le_cloudabi_vec;
extern const bfd_target alpha_ecoff_le_vec;
extern const bfd_target alpha_elf64_vec;
extern const bfd_target alpha_elf64_fbsd_vec;
@@ -948,7 +950,9 @@ static const bfd_target * const _bfd_target_vector[] =
&aarch64_elf32_be_vec,
&aarch64_elf32_le_vec,
&aarch64_elf64_be_vec,
+ &aarch64_elf64_be_cloudabi_vec,
&aarch64_elf64_le_vec,
+ &aarch64_elf64_le_cloudabi_vec,
#endif
#ifdef BFD64