GNU Binutils with patches for OS216
Revisión | a75cf613fd7d0a48d526a996ff5c250c599d3ab7 (tree) |
---|---|
Tiempo | 2015-10-29 22:49:03 |
Autor | Ed Schouten <ed@nuxi...> |
Commiter | Nick Clifton |
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.
@@ -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 | + | |
1 | 11 | 2015-10-29 Pedro Alves <palves@redhat.com> |
2 | 12 | |
3 | 13 | * libhppa.h (bfd_hppa_insn2fmt): Add cast. |
@@ -184,6 +184,11 @@ case "${targ}" in | ||
184 | 184 | targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec" |
185 | 185 | want64=true |
186 | 186 | ;; |
187 | + aarch64-*-cloudabi*) | |
188 | + targ_defvec=aarch64_elf64_le_cloudabi_vec | |
189 | + targ_selvecs=aarch64_elf64_be_cloudabi_vec | |
190 | + want64=true | |
191 | + ;; | |
187 | 192 | aarch64-*-linux*) |
188 | 193 | targ_defvec=aarch64_elf64_le_vec |
189 | 194 | targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec" |
@@ -15250,7 +15250,9 @@ do | ||
15250 | 15250 | aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; |
15251 | 15251 | aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; |
15252 | 15252 | 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 ;; | |
15253 | 15254 | 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 ;; | |
15254 | 15256 | alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;; |
15255 | 15257 | alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
15256 | 15258 | alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
@@ -695,8 +695,10 @@ do | ||
695 | 695 | # use one entry per line, even though this leads to long lines. |
696 | 696 | aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; |
697 | 697 | 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 ;; | |
700 | 702 | alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;; |
701 | 703 | alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
702 | 704 | alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
@@ -9385,3 +9385,22 @@ const struct elf_size_info elfNN_aarch64_size_info = | ||
9385 | 9385 | #define elf_backend_obj_attrs_section ".ARM.attributes" |
9386 | 9386 | |
9387 | 9387 | #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" |
@@ -568,7 +568,9 @@ to find an alternative output format that is suitable. | ||
568 | 568 | extern const bfd_target aarch64_elf32_be_vec; |
569 | 569 | extern const bfd_target aarch64_elf32_le_vec; |
570 | 570 | extern const bfd_target aarch64_elf64_be_vec; |
571 | +extern const bfd_target aarch64_elf64_be_cloudabi_vec; | |
571 | 572 | extern const bfd_target aarch64_elf64_le_vec; |
573 | +extern const bfd_target aarch64_elf64_le_cloudabi_vec; | |
572 | 574 | extern const bfd_target alpha_ecoff_le_vec; |
573 | 575 | extern const bfd_target alpha_elf64_vec; |
574 | 576 | extern const bfd_target alpha_elf64_fbsd_vec; |
@@ -948,7 +950,9 @@ static const bfd_target * const _bfd_target_vector[] = | ||
948 | 950 | &aarch64_elf32_be_vec, |
949 | 951 | &aarch64_elf32_le_vec, |
950 | 952 | &aarch64_elf64_be_vec, |
953 | + &aarch64_elf64_be_cloudabi_vec, | |
951 | 954 | &aarch64_elf64_le_vec, |
955 | + &aarch64_elf64_le_cloudabi_vec, | |
952 | 956 | #endif |
953 | 957 | |
954 | 958 | #ifdef BFD64 |
@@ -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 | + | |
1 | 6 | 2015-10-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
2 | 7 | |
3 | 8 | * config/tc-arm.c (insns): Guard cps by arm_ext_v6_notm instead of |
@@ -7309,6 +7309,11 @@ aarch64_force_relocation (struct fix *fixp) | ||
7309 | 7309 | const char * |
7310 | 7310 | elf64_aarch64_target_format (void) |
7311 | 7311 | { |
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 | + } | |
7312 | 7317 | if (target_big_endian) |
7313 | 7318 | return ilp32_p ? "elf32-bigaarch64" : "elf64-bigaarch64"; |
7314 | 7319 | else |
@@ -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 | + | |
1 | 11 | 2015-10-29 Nick Clifton <nickc@redhat.com> |
2 | 12 | |
3 | 13 | PR ld/19146 |
@@ -435,6 +435,8 @@ ALL_64_EMULATION_SOURCES = \ | ||
435 | 435 | eaarch64elf32.c \ |
436 | 436 | eaarch64elfb.c \ |
437 | 437 | eaarch64elf32b.c \ |
438 | + eaarch64cloudabi.c \ | |
439 | + eaarch64cloudabib.c \ | |
438 | 440 | eaarch64fbsd.c \ |
439 | 441 | eaarch64fbsdb.c \ |
440 | 442 | eaarch64linux.c \ |
@@ -1618,6 +1620,14 @@ eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aar | ||
1618 | 1620 | $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ |
1619 | 1621 | $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
1620 | 1622 | |
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 | + | |
1621 | 1631 | eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \ |
1622 | 1632 | $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ |
1623 | 1633 | $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
@@ -764,6 +764,8 @@ ALL_64_EMULATION_SOURCES = \ | ||
764 | 764 | eaarch64elf32.c \ |
765 | 765 | eaarch64elfb.c \ |
766 | 766 | eaarch64elf32b.c \ |
767 | + eaarch64cloudabi.c \ | |
768 | + eaarch64cloudabib.c \ | |
767 | 769 | eaarch64fbsd.c \ |
768 | 770 | eaarch64fbsdb.c \ |
769 | 771 | eaarch64linux.c \ |
@@ -3122,6 +3124,14 @@ eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aar | ||
3122 | 3124 | $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ |
3123 | 3125 | $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
3124 | 3126 | |
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 | + | |
3125 | 3135 | eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \ |
3126 | 3136 | $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \ |
3127 | 3137 | $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
@@ -49,6 +49,8 @@ aarch64_be-*-elf) targ_emul=aarch64elfb | ||
49 | 49 | targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;; |
50 | 50 | aarch64-*-elf) targ_emul=aarch64elf |
51 | 51 | targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;; |
52 | +aarch64-*-cloudabi*) targ_emul=aarch64cloudabi | |
53 | + targ_extra_emuls=aarch64cloudabib ;; | |
52 | 54 | aarch64-*-freebsd*) targ_emul=aarch64fbsd |
53 | 55 | targ_extra_emuls="aarch64fbsdb aarch64elf" ;; |
54 | 56 | aarch64_be-*-linux*) targ_emul=aarch64linuxb |
@@ -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)} }" |
@@ -0,0 +1,2 @@ | ||
1 | +. ${srcdir}/emulparams/aarch64cloudabi.sh | |
2 | +OUTPUT_FORMAT="elf64-bigaarch64-cloudabi" |