Add support for Nuxi CloudABI on x86-64
authorEd Schouten <ed@nuxi.nl>
Tue, 31 Mar 2015 09:33:45 +0000 (11:33 +0200)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 31 Mar 2015 15:11:08 +0000 (08:11 -0700)
bfd/

* config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
for x86_64-*-cloudabi*.
* configure.ac: Handle x86_64_elf64_cloudabi_vec.
* configure: Regenerated.
* elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
(TARGET_LITTLE_NAME): Likewise.
(ELF_OSABI): Likewise.
(elf64_bed): Likewise.
* targets.c (x86_64_elf64_cloudabi_vec): New.
(_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.

gas/

* configure.tgt (fmt): Set to elf for *-*-cloudabi*.

ld/

* Makefile.am (ALL_64_EMULATION_SOURCES): Add
eelf_x86_64_cloudabi.c.
(eelf_x86_64_cloudabi.c): New.
* configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for
x86_64-*-cloudabi*.
* Makefile.in: Regenerated.
* emulparams/elf_x86_64_cloudabi.sh: New file.

13 files changed:
bfd/ChangeLog
bfd/config.bfd
bfd/configure
bfd/configure.ac
bfd/elf64-x86-64.c
bfd/targets.c
gas/ChangeLog
gas/configure.tgt
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/elf_x86_64_cloudabi.sh [new file with mode: 0644]

index 52ee750fdf8f4fa43018a2b199e9fe3354c58b84..10ea6fc5fa1e91d4f1855a4e503ff7d329b36ccd 100644 (file)
@@ -1,3 +1,16 @@
+2015-03-31  Ed Schouten  <ed@nuxi.nl>
+
+       * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
+       for x86_64-*-cloudabi*.
+       * configure.ac: Handle x86_64_elf64_cloudabi_vec.
+       * configure: Regenerated.
+       * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
+       (TARGET_LITTLE_NAME): Likewise.
+       (ELF_OSABI): Likewise.
+       (elf64_bed): Likewise.
+       * targets.c (x86_64_elf64_cloudabi_vec): New.
+       (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
+
 2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure.ac: Revert the AM_ZLIB change.
index b79c7115f3035b7bea6dd96e30d9fa26a2a4fd69..4799da862870250008f377998b69f598457da3bf 100644 (file)
@@ -645,6 +645,10 @@ case "${targ}" in
     targ_archs="$targ_archs bfd_arm_arch"
     ;;
 #ifdef BFD64
+  x86_64-*-cloudabi*)
+    targ_defvec=x86_64_elf64_cloudabi_vec
+    want64=true
+    ;;
   x86_64-*-darwin*)
     targ_defvec=x86_64_mach_o_vec
     targ_selvecs="i386_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
index 2231e780bae1a06921848f9a400f5d482b55ada2..777d74abdef6b881cd3b582d37381bbb166220ac 100755 (executable)
@@ -15540,6 +15540,7 @@ do
     x86_64_elf32_vec)           tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
     x86_64_elf32_nacl_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
     x86_64_elf64_vec)           tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    x86_64_elf64_cloudabi_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     x86_64_elf64_fbsd_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     x86_64_elf64_nacl_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     x86_64_elf64_sol2_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
index a1b20358dbf07c51772f3fe4e2dc2fae06c61b27..8ac36de4c2f0150e6f1d4e574afa08be2c1e669d 100644 (file)
@@ -1008,6 +1008,7 @@ do
     x86_64_elf32_vec)           tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
     x86_64_elf32_nacl_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
     x86_64_elf64_vec)           tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    x86_64_elf64_cloudabi_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     x86_64_elf64_fbsd_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     x86_64_elf64_nacl_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     x86_64_elf64_sol2_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
index 74d1d0668f1e3610574e7a57ac0a2636c9c1b6cd..ab72306bca5704cb875b91c161d7c076f1524845 100644 (file)
@@ -5927,6 +5927,21 @@ static const struct bfd_elf_special_section
 
 #include "elf64-target.h"
 
+/* CloudABI support.  */
+
+#undef  TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM                  x86_64_elf64_cloudabi_vec
+#undef  TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME                 "elf64-x86-64-cloudabi"
+
+#undef ELF_OSABI
+#define        ELF_OSABI                           ELFOSABI_CLOUDABI
+
+#undef  elf64_bed
+#define elf64_bed elf64_x86_64_cloudabi_bed
+
+#include "elf64-target.h"
+
 /* FreeBSD support.  */
 
 #undef  TARGET_LITTLE_SYM
index 9b5458efb8e912ea5e33dd9ef02852777b30603b..2319d23a0aa40c87b923737cf4b714eac5f64298 100644 (file)
@@ -885,6 +885,7 @@ 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;
@@ -1402,6 +1403,7 @@ static const bfd_target * const _bfd_target_vector[] =
        &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,
index e5b1cd5b2ec9a700ace08d25305795fa2294c494..7052c62ed364f97d235e873f1548d2737a628831 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-31  Ed Schouten  <ed@nuxi.nl>
+
+       * configure.tgt (fmt): Set to elf for *-*-cloudabi*.
+
 2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure.ac: Revert the AM_ZLIB change.
index bfff2d7e8ab647d12caba0c4de7466212076924c..79699704cee89d4d07e04b7a1a4f5f5d7f6694c4 100644 (file)
@@ -470,6 +470,7 @@ case ${generic_target} in
   z8k-*-coff | z8k-*-sim)              fmt=coff ;;
 
   *-*-aout | *-*-scout)                        fmt=aout ;;
+  *-*-cloudabi*)                       fmt=elf ;;
   *-*-dragonfly*)                      fmt=elf em=dragonfly ;;
   *-*-freebsd* | *-*-kfreebsd*-gnu)    fmt=elf em=freebsd ;;
   *-*-bsd*)                            fmt=aout em=sun3 ;;
index 7b280142c7b76cc834746bae2b1cf3dc5d7088fb..5d120f1dec7221f91fdb700dcaf85227000eb112 100644 (file)
@@ -1,3 +1,13 @@
+2015-03-31  Ed Schouten  <ed@nuxi.nl>
+
+       * Makefile.am (ALL_64_EMULATION_SOURCES): Add
+       eelf_x86_64_cloudabi.c.
+       (eelf_x86_64_cloudabi.c): New.
+       * configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for
+       x86_64-*-cloudabi*.
+       * Makefile.in: Regenerated.
+       * emulparams/elf_x86_64_cloudabi.sh: New file.
+
 2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure.ac (AM_ZLIB): Removed.
index 22b04195350dda6641246a792f58a1b830143240..474fc07e83475bf7706886f74effdb7870f16efa 100644 (file)
@@ -483,6 +483,7 @@ ALL_64_EMULATION_SOURCES = \
        eelf_k1om.c \
        eelf_k1om_fbsd.c \
        eelf_x86_64.c \
+       eelf_x86_64_cloudabi.c \
        eelf_x86_64_fbsd.c \
        eelf_x86_64_nacl.c \
        eelf_x86_64_sol2.c \
@@ -1938,6 +1939,10 @@ eelf_k1om_fbsd.c: $(srcdir)/emulparams/elf_k1om_fbsd.sh \
 eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \
+  $(srcdir)/emulparams/elf_x86_64.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
   $(srcdir)/emulparams/elf_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
index 97fc3fa320f7c67a434c4e748ec841e0f1ca51d2..9c969eef2890abed3faafe7e6927bd19bc02acca 100644 (file)
@@ -808,6 +808,7 @@ ALL_64_EMULATION_SOURCES = \
        eelf_k1om.c \
        eelf_k1om_fbsd.c \
        eelf_x86_64.c \
+       eelf_x86_64_cloudabi.c \
        eelf_x86_64_fbsd.c \
        eelf_x86_64_nacl.c \
        eelf_x86_64_sol2.c \
@@ -1269,6 +1270,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_s390.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_nacl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_sol2.Po@am__quote@
@@ -3429,6 +3431,10 @@ eelf_k1om_fbsd.c: $(srcdir)/emulparams/elf_k1om_fbsd.sh \
 eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \
+  $(srcdir)/emulparams/elf_x86_64.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
   $(srcdir)/emulparams/elf_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
index a46fbca4f7fc704c33d1579f6ef71e4b14982ec5..4b967febfe74c6a9f9d4062c497d9f09a1ed63a8 100644 (file)
@@ -228,6 +228,7 @@ i[3-7]86-*-rtems*)  targ_emul=elf_i386 ;;
 i[3-7]86-*-aros*)      targ_emul=elf_i386 ;;
 i[3-7]86-*-rdos*)      targ_emul=elf_i386 ;;
 x86_64-*-rdos*)                targ_emul=elf64rdos ;;
+x86_64-*-cloudabi*)    targ_emul=elf_x86_64_cloudabi ;;
 i[3-7]86-*-bsd)                targ_emul=i386bsd ;;
 i[3-7]86-*-bsd386)     targ_emul=i386bsd ;;
 i[3-7]86-*-bsdi*)      targ_emul=i386bsd ;;
diff --git a/ld/emulparams/elf_x86_64_cloudabi.sh b/ld/emulparams/elf_x86_64_cloudabi.sh
new file mode 100644 (file)
index 0000000..4d5f745
--- /dev/null
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/elf_x86_64.sh
+OUTPUT_FORMAT="elf64-x86-64-cloudabi"