• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisióna75cf613fd7d0a48d526a996ff5c250c599d3ab7 (tree)
Tiempo2015-10-29 22:49:03
AutorEd Schouten <ed@nuxi...>
CommiterNick Clifton

Log Message

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.

Cambiar Resumen

Diferencia incremental

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
1+2015-10-29 Ed Schouten <ed@nuxi.nl>
2+
3+ * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
4+ For this target we have to make sure we use ELFOSABI_CLOUDABI
5+ instead of ELFOSABI_NONE.
6+ * configure.ac (tb): Likewise.
7+ * elfnn-aarch64.c: Likewise.
8+ * targets.c (_bfd_target_vector): Likewise.
9+ * configure: Regenerate.
10+
111 2015-10-29 Pedro Alves <palves@redhat.com>
212
313 * libhppa.h (bfd_hppa_insn2fmt): Add cast.
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -184,6 +184,11 @@ case "${targ}" in
184184 targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
185185 want64=true
186186 ;;
187+ aarch64-*-cloudabi*)
188+ targ_defvec=aarch64_elf64_le_cloudabi_vec
189+ targ_selvecs=aarch64_elf64_be_cloudabi_vec
190+ want64=true
191+ ;;
187192 aarch64-*-linux*)
188193 targ_defvec=aarch64_elf64_le_vec
189194 targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
--- a/bfd/configure
+++ b/bfd/configure
@@ -15250,7 +15250,9 @@ do
1525015250 aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
1525115251 aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
1525215252 aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
15253+ aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
1525315254 aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
15255+ aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
1525415256 alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
1525515257 alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
1525615258 alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -695,8 +695,10 @@ do
695695 # use one entry per line, even though this leads to long lines.
696696 aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
697697 aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
698- aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
699- aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
698+ aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
699+ aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
700+ aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
701+ aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
700702 alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
701703 alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
702704 alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -9385,3 +9385,22 @@ const struct elf_size_info elfNN_aarch64_size_info =
93859385 #define elf_backend_obj_attrs_section ".ARM.attributes"
93869386
93879387 #include "elfNN-target.h"
9388+
9389+/* CloudABI support. */
9390+
9391+#undef TARGET_LITTLE_SYM
9392+#define TARGET_LITTLE_SYM aarch64_elfNN_le_cloudabi_vec
9393+#undef TARGET_LITTLE_NAME
9394+#define TARGET_LITTLE_NAME "elfNN-littleaarch64-cloudabi"
9395+#undef TARGET_BIG_SYM
9396+#define TARGET_BIG_SYM aarch64_elfNN_be_cloudabi_vec
9397+#undef TARGET_BIG_NAME
9398+#define TARGET_BIG_NAME "elfNN-bigaarch64-cloudabi"
9399+
9400+#undef ELF_OSABI
9401+#define ELF_OSABI ELFOSABI_CLOUDABI
9402+
9403+#undef elfNN_bed
9404+#define elfNN_bed elfNN_aarch64_cloudabi_bed
9405+
9406+#include "elfNN-target.h"
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -568,7 +568,9 @@ to find an alternative output format that is suitable.
568568 extern const bfd_target aarch64_elf32_be_vec;
569569 extern const bfd_target aarch64_elf32_le_vec;
570570 extern const bfd_target aarch64_elf64_be_vec;
571+extern const bfd_target aarch64_elf64_be_cloudabi_vec;
571572 extern const bfd_target aarch64_elf64_le_vec;
573+extern const bfd_target aarch64_elf64_le_cloudabi_vec;
572574 extern const bfd_target alpha_ecoff_le_vec;
573575 extern const bfd_target alpha_elf64_vec;
574576 extern const bfd_target alpha_elf64_fbsd_vec;
@@ -948,7 +950,9 @@ static const bfd_target * const _bfd_target_vector[] =
948950 &aarch64_elf32_be_vec,
949951 &aarch64_elf32_le_vec,
950952 &aarch64_elf64_be_vec,
953+ &aarch64_elf64_be_cloudabi_vec,
951954 &aarch64_elf64_le_vec,
955+ &aarch64_elf64_le_cloudabi_vec,
952956 #endif
953957
954958 #ifdef BFD64
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
1+2015-10-29 Nick Clifton <nickc@redhat.com>
2+
3+ * config/tc-aarch64.c (elf64_aarch64_target_format): Select the
4+ cloudabi format if the TARGET_OS is cloudabi.
5+
16 2015-10-29 Thomas Preud'homme <thomas.preudhomme@arm.com>
27
38 * config/tc-arm.c (insns): Guard cps by arm_ext_v6_notm instead of
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -7309,6 +7309,11 @@ aarch64_force_relocation (struct fix *fixp)
73097309 const char *
73107310 elf64_aarch64_target_format (void)
73117311 {
7312+ if (strcmp (TARGET_OS, "cloudabi") == 0)
7313+ {
7314+ /* FIXME: What to do for ilp32_p ? */
7315+ return target_big_endian ? "elf64-bigaarch64-cloudabi" : "elf64-littleaarch64-cloudabi";
7316+ }
73127317 if (target_big_endian)
73137318 return ilp32_p ? "elf32-bigaarch64" : "elf64-bigaarch64";
73147319 else
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
1+2015-10-29 Ed Schouten <ed@nuxi.nl>
2+
3+ * Makefile.am (ALL_64_EMULATION_SOURCES): Add support for
4+ CloudABI on aarch64. For this target we have to make sure we use
5+ ELFOSABI_CLOUDABI instead of ELFOSABI_NONE.
6+ * configure.tgt (targ_emul): Likewise.
7+ * emulparams/aarch64cloudabi.sh: New file.
8+ * emulparams/aarch64cloudabib.sh: New file.
9+ * Makefile.in: Regenerate.
10+
111 2015-10-29 Nick Clifton <nickc@redhat.com>
212
313 PR ld/19146
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -435,6 +435,8 @@ ALL_64_EMULATION_SOURCES = \
435435 eaarch64elf32.c \
436436 eaarch64elfb.c \
437437 eaarch64elf32b.c \
438+ eaarch64cloudabi.c \
439+ eaarch64cloudabib.c \
438440 eaarch64fbsd.c \
439441 eaarch64fbsdb.c \
440442 eaarch64linux.c \
@@ -1618,6 +1620,14 @@ eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aar
16181620 $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
16191621 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
16201622
1623+eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
1624+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1625+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1626+
1627+eaarch64cloudabib.c: $(srcdir)/emulparams/aarch64cloudabib.sh $(srcdir)/emulparams/aarch64cloudabi.sh \
1628+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
1629+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
1630+
16211631 eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \
16221632 $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
16231633 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -764,6 +764,8 @@ ALL_64_EMULATION_SOURCES = \
764764 eaarch64elf32.c \
765765 eaarch64elfb.c \
766766 eaarch64elf32b.c \
767+ eaarch64cloudabi.c \
768+ eaarch64cloudabib.c \
767769 eaarch64fbsd.c \
768770 eaarch64fbsdb.c \
769771 eaarch64linux.c \
@@ -3122,6 +3124,14 @@ eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aar
31223124 $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
31233125 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
31243126
3127+eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
3128+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
3129+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
3130+
3131+eaarch64cloudabib.c: $(srcdir)/emulparams/aarch64cloudabib.sh $(srcdir)/emulparams/aarch64cloudabi.sh \
3132+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
3133+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
3134+
31253135 eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \
31263136 $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
31273137 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -49,6 +49,8 @@ aarch64_be-*-elf) targ_emul=aarch64elfb
4949 targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
5050 aarch64-*-elf) targ_emul=aarch64elf
5151 targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;;
52+aarch64-*-cloudabi*) targ_emul=aarch64cloudabi
53+ targ_extra_emuls=aarch64cloudabib ;;
5254 aarch64-*-freebsd*) targ_emul=aarch64fbsd
5355 targ_extra_emuls="aarch64fbsdb aarch64elf" ;;
5456 aarch64_be-*-linux*) targ_emul=aarch64linuxb
--- /dev/null
+++ b/ld/emulparams/aarch64cloudabi.sh
@@ -0,0 +1,37 @@
1+ARCH=aarch64
2+MACHINE=
3+NOP=0
4+
5+SCRIPT_NAME=elf
6+ELFSIZE=64
7+OUTPUT_FORMAT="elf64-littleaarch64-cloudabi"
8+BIG_OUTPUT_FORMAT="elf64-bigaarch64-cloudabi"
9+LITTLE_OUTPUT_FORMAT="elf64-littleaarch64-cloudabi"
10+NO_REL_RELOCS=yes
11+
12+TEMPLATE_NAME=elf32
13+EXTRA_EM_FILE=aarch64elf
14+
15+GENERATE_SHLIB_SCRIPT=yes
16+GENERATE_PIE_SCRIPT=yes
17+
18+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
19+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
20+SEPARATE_GOTPLT=24
21+IREL_IN_PLT=
22+
23+TEXT_START_ADDR=0x400000
24+
25+DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
26+
27+# AArch64 does not support .s* sections.
28+NO_SMALL_DATA=yes
29+
30+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
31+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
32+OTHER_END_SYMBOLS='__end__ = . ;'
33+
34+OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
35+ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
36+# Ensure each PLT entry is aligned to a cache line.
37+PLT=".plt ${RELOCATING-0} : ALIGN(16) { *(.plt)${IREL_IN_PLT+ *(.iplt)} }"
--- /dev/null
+++ b/ld/emulparams/aarch64cloudabib.sh
@@ -0,0 +1,2 @@
1+. ${srcdir}/emulparams/aarch64cloudabi.sh
2+OUTPUT_FORMAT="elf64-bigaarch64-cloudabi"