Add support for Fushia OS.
authorJosh Conner <joshconner@google.com>
Fri, 2 Dec 2016 10:44:29 +0000 (10:44 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 2 Dec 2016 10:44:29 +0000 (10:44 +0000)
        * configure.ac: Add fuchsia to targets that use ELF.
        * configure: Regenerated.

bfd     * configure.tgt: Add support for fuchsia (OS).

gas     * configure.tgt: Add support for fuchsia (OS).

ld      * Makefile.am: Add dependency information for earmelf_fuchsia.c.
        * Makefile.in: Regenerate.
        * configure.tgt: Add support for aarch64-*-fuchsia, arm*-*-fuchsia*, and
        x86_64-*-fuchsia* targets.
        * emulparams/armelf_fuchsia.sh: New file.
        * emulparams/armelfb_fuchsia.sh: New file.

13 files changed:
ChangeLog
bfd/ChangeLog
bfd/config.bfd
configure
configure.ac
gas/ChangeLog
gas/configure.tgt
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/armelf_fuchsia.sh [new file with mode: 0644]
ld/emulparams/armelfb_fuchsia.sh [new file with mode: 0644]

index 84ad164931a49572f4b33bc1974638adb8a88c17..ee8013a96827bd50d9d9c1a9ca276f09d565aa51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-02  Josh Conner  <joshconner@google.com>
+
+       * configure.ac: Add fuchsia to targets that use ELF.
+       * configure: Regenerated.
+
 2016-11-07  Doug Evans  <dje@google.com>
 
        * config.sub: Sync with upstream version 2016-11-03.
index 68e5032488d79d97b0ec22d4363b8b627aeefd05..cef1c4b6abac8e556af02c0c49cebc7c107d6e96 100644 (file)
@@ -1,3 +1,7 @@
+2016-12-02  Josh Conner  <joshconner@google.com>
+
+       * configure.tgt: Add support for fuchsia (OS).
+
 2016-12-01  Yury Norov  <ynorov@caviumnetworks.com>
 
        PR ld/20868
index b692f0a1140a0a266340cc7bbd53520c144de5c9..5bca5d9161eb5ea8e93812238fe6cab7aeae8870 100644 (file)
@@ -260,6 +260,11 @@ case "${targ}" in
     targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
     want64=true
     ;;
+  aarch64-*-fuchsia*)
+    targ_defvec=aarch64_elf64_le_vec
+    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
@@ -359,6 +364,10 @@ case "${targ}" in
     targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
     targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
     ;;
+  arm-*-fuchsia*)
+    targ_defvec=arm_elf32_le_vec
+    targ_selvecs="arm_elf32_be_vec"
+    ;;
   arm-*-nacl*)
     targ_defvec=arm_elf32_nacl_le_vec
     targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec"
@@ -766,7 +775,7 @@ case "${targ}" in
     targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
     want64=true
     ;;
-  x86_64-*-elf* | x86_64-*-rtems*)
+  x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia)
     targ_defvec=x86_64_elf64_vec
     targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec l1om_elf64_vec k1om_elf64_vec"
     want64=true
index a5f4fc5aa74efb55e6d2574b169080c9ddcc2b81..5b0ceb7a244e831fe02269af207c1e924a690e05 100755 (executable)
--- a/configure
+++ b/configure
@@ -2959,7 +2959,7 @@ case "${ENABLE_GOLD}" in
       *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
       | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
       | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
-      | *-*-solaris2* | *-*-nto* | *-*-nacl*)
+      | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
         case "${target}" in
           *-*-linux*aout* | *-*-linux*oldld*)
             ;;
index a27985c0a707928553620bd0f9d460a63d3a4f6a..3ec86c19df7d8d8cb64b557018ea3fc77b822436 100644 (file)
@@ -337,7 +337,7 @@ case "${ENABLE_GOLD}" in
       *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
       | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
       | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
-      | *-*-solaris2* | *-*-nto* | *-*-nacl*)
+      | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-fuchsia*)
         case "${target}" in
           *-*-linux*aout* | *-*-linux*oldld*)
             ;;
index a142857cba48281d0e5f503288bcc84ffa5d8f74..f0985bb5ae8e77d7fcec91ad9cc0f29065324733 100644 (file)
@@ -1,3 +1,7 @@
+2016-12-02  Josh Conner  <joshconner@google.com>
+
+       * configure.tgt: Add support for fuchsia (OS).
+
 2016-12-01  Nick Clifton  <nickc@redhat.com>
 
        PR gas/20898
index 3e230cba934db10764bb10e103760f4ebf5b38e4..495155539b7bca2bb66163ad94abe5d87aa3dc8d 100644 (file)
@@ -123,6 +123,7 @@ generic_target=${cpu_type}-$vendor-$os
 # Note: This table is alpha-sorted, please try to keep it that way.
 case ${generic_target} in
   aarch64*-*-elf | aarch64*-*-rtems*)  fmt=elf;;
+  aarch64*-*-fuchsia*)                 fmt=elf;;
   aarch64*-*-linux*)                   fmt=elf em=linux ;;
 
   alpha-*-*vms*)                       fmt=evax ;;
@@ -161,6 +162,7 @@ case ${generic_target} in
                                        fmt=coff em=wince-pe ;;
   arm-*-pe)                            fmt=coff em=pe ;;
   arm-*-riscix*)                       fmt=aout em=riscix ;;
+  arm-*-fuchsia*)                      fmt=elf ;;
 
   avr-*-*)                             fmt=elf bfd_gas=yes ;;
 
@@ -221,6 +223,7 @@ case ${generic_target} in
   i386-*-coff)                         fmt=coff ;;
   i386-*-elfiamcu)                     fmt=elf arch=iamcu ;;
   i386-*-elf*)                         fmt=elf ;;
+  i386-*-fuchsia*)                     fmt=elf ;;
   i386-*-kaos*)                                fmt=elf ;;
   i386-*-bsd*)                         fmt=aout em=386bsd ;;
   i386-*-nacl*)                                fmt=elf em=nacl
index 65c2854e9da72523ddadd5ad3412c8f148b282a5..c4bbe552cfe9d170bcf64448930404081573079a 100644 (file)
@@ -1,3 +1,12 @@
+2016-12-02  Josh Conner  <joshconner@google.com>
+
+        * Makefile.am: Add dependency information for earmelf_fuchsia.c.
+        * Makefile.in: Regenerate.
+        * configure.tgt: Add support for aarch64-*-fuchsia, arm*-*-fuchsia*, and
+        x86_64-*-fuchsia* targets.
+        * emulparams/armelf_fuchsia.sh: New file.
+        * emulparams/armelfb_fuchsia.sh: New file.
+
 2016-12-01  Rudy Y  <rudyy.id@gmail.com>
 
        PR ld/20880
index 9b3de728731c1fbd62b0078eb2ab08529eabad15..ac908bce859a9b0057d51b6be3ad2a8859b42d91 100644 (file)
@@ -179,6 +179,7 @@ ALL_EMULATION_SOURCES = \
        earmcoff.c \
        earmelf.c \
        earmelf_fbsd.c \
+       earmelf_fuchsia.c \
        earmelf_linux.c \
        earmelf_linux_eabi.c \
        earmelf_nacl.c \
@@ -187,6 +188,7 @@ ALL_EMULATION_SOURCES = \
        earmelf_vxworks.c \
        earmelfb.c \
        earmelfb_fbsd.c \
+       earmelfb_fuchsia.c \
        earmelfb_linux.c \
        earmelfb_linux_eabi.c \
        earmelfb_nacl.c \
@@ -763,6 +765,10 @@ earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+earmelf_fuchsia.c: $(srcdir)/emulparams/armelf_fuchsia.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -803,6 +809,10 @@ earmelfb_fbsd.c: $(srcdir)/emulparams/armelfb_fbsd.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+earmelf_fuchsia.c: $(srcdir)/emulparams/armelfb_fuchsia.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
   $(srcdir)/emulparams/armelf_linux.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
index f87408e283cf5a9abad99643ca8724b373ff9cd9..46c0302df18263e5e5137e533435e04253e98921 100644 (file)
@@ -548,6 +548,7 @@ ALL_EMULATION_SOURCES = \
        earmcoff.c \
        earmelf.c \
        earmelf_fbsd.c \
+       earmelf_fuchsia.c \
        earmelf_linux.c \
        earmelf_linux_eabi.c \
        earmelf_nacl.c \
@@ -556,6 +557,7 @@ ALL_EMULATION_SOURCES = \
        earmelf_vxworks.c \
        earmelfb.c \
        earmelfb_fbsd.c \
+       earmelfb_fuchsia.c \
        earmelfb_linux.c \
        earmelfb_linux_eabi.c \
        earmelfb_nacl.c \
@@ -1187,6 +1189,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmcoff.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fuchsia.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Po@am__quote@
@@ -1195,6 +1198,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_fbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_fuchsia.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Po@am__quote@
@@ -2354,6 +2358,10 @@ earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+earmelf_fuchsia.c: $(srcdir)/emulparams/armelf_fuchsia.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -2394,6 +2402,10 @@ earmelfb_fbsd.c: $(srcdir)/emulparams/armelfb_fbsd.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+earmelf_fuchsia.c: $(srcdir)/emulparams/armelfb_fuchsia.sh \
+  $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
   $(srcdir)/emulparams/armelf_linux.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
index c196e6848028e204eb20b205354f632d73ddc63b..b9f4782b4d1f25aad1aa2cc33e18a8975f09b0e6 100644 (file)
@@ -54,6 +54,8 @@ aarch64-*-cloudabi*)  targ_emul=aarch64cloudabi
                        targ_extra_emuls=aarch64cloudabib ;;
 aarch64-*-freebsd*)    targ_emul=aarch64fbsd
                        targ_extra_emuls="aarch64fbsdb aarch64elf" ;;
+aarch64-*-fuchsia*)    targ_emul=aarch64elf
+                       targ_extra_emuls="aarch64elfb armelf armelfb" ;;
 aarch64_be-*-linux*)   targ_emul=aarch64linuxb
                        targ_extra_libpath="aarch64linux aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
                        targ_extra_emuls="aarch64elfb aarch64elf aarch64elf32 aarch64elf32b armelfb armelf $targ_extra_libpath" ;;
@@ -150,6 +152,9 @@ arm*-*-uclinux*)    targ_emul=armelf_linux
                        ;;
 arm-*-vxworks)         targ_emul=armelf_vxworks ;;
 arm*-*-conix*)         targ_emul=armelf ;;
+arm*-*-fuchsia*)       targ_emul=armelf_fuchsia
+                       targ_extra_emuls="armelfb_fuchsia armelf armelfb"
+                       ;;
 avr-*-*)               targ_emul=avr2
                        targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny"
                        ;;
@@ -316,7 +321,7 @@ i[3-7]86-*-elfiamcu)        targ_emul=elf_iamcu
                        targ_extra_emuls=elf_i386 ;;
 i[3-7]86-*-elf*)       targ_emul=elf_i386
                        targ_extra_emuls=elf_iamcu ;;
-x86_64-*-elf* | x86_64-*-rtems*)
+x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia*)
                        targ_emul=elf_x86_64
                        targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
                        targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
diff --git a/ld/emulparams/armelf_fuchsia.sh b/ld/emulparams/armelf_fuchsia.sh
new file mode 100644 (file)
index 0000000..8626b0e
--- /dev/null
@@ -0,0 +1,32 @@
+ARCH=arm
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=armelf
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+
+DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+OTHER_END_SYMBOLS='__end__ = . ;'
+OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
+
+TEXT_START_ADDR=0x00001000
+TARGET2_TYPE=got-rel
+
+# ARM does not support .s* sections.
+NO_SMALL_DATA=yes
+
+# Use the ARM ABI-compliant exception-handling sections.
+OTHER_READONLY_SECTIONS="
+  .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
+  ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
+  .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
+  ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
+
diff --git a/ld/emulparams/armelfb_fuchsia.sh b/ld/emulparams/armelfb_fuchsia.sh
new file mode 100644 (file)
index 0000000..7e6f34a
--- /dev/null
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/armelf_fuchsia.sh
+OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"