mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
binutils: Add support for Haiku ARM64 target
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com> Change-Id: Iebbfba7285429bded988ed0f80a574c471fa9f7d Reviewed-on: https://review.haiku-os.org/c/buildtools/+/1796 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
18e01e2af6
commit
e97614541b
@ -255,6 +255,11 @@ case "${targ}" in
|
||||
targ_selvecs=aarch64_elf64_be_cloudabi_vec
|
||||
want64=true
|
||||
;;
|
||||
aarch64-*-haiku*)
|
||||
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"
|
||||
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"
|
||||
|
@ -398,6 +398,7 @@ ALL_64_EMULATION_SOURCES = \
|
||||
eaarch64cloudabib.c \
|
||||
eaarch64fbsd.c \
|
||||
eaarch64fbsdb.c \
|
||||
eaarch64haiku.c \
|
||||
eaarch64linux.c \
|
||||
eaarch64linuxb.c \
|
||||
eaarch64linux32.c \
|
||||
@ -1561,6 +1562,10 @@ eaarch64fbsdb.c: $(srcdir)/emulparams/aarch64fbsdb.sh $(srcdir)/emulparams/aarch
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64haiku.c: $(srcdir)/emulparams/aarch64haiku.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64linux.c: $(srcdir)/emulparams/aarch64linux.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
@ -521,6 +521,7 @@ pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
@ -749,8 +750,8 @@ ALL_EMULATION_SOURCES = \
|
||||
eelf32or1k_linux.c \
|
||||
eelf32ppc.c \
|
||||
eelf32ppc_fbsd.c \
|
||||
eelf32ppchaiku.c \
|
||||
eelf32ppclinux.c \
|
||||
eelf32ppchaiku.c \
|
||||
eelf32ppcnto.c \
|
||||
eelf32ppcsim.c \
|
||||
eelf32ppcvxworks.c \
|
||||
@ -779,6 +780,7 @@ ALL_EMULATION_SOURCES = \
|
||||
eelf_i386_nacl.c \
|
||||
eelf_i386_sol2.c \
|
||||
eelf_i386_vxworks.c \
|
||||
eelf_mipsel_haiku.c \
|
||||
eelf_iamcu.c \
|
||||
eelf_s390.c \
|
||||
eh8300elf.c \
|
||||
@ -882,6 +884,7 @@ ALL_64_EMULATION_SOURCES = \
|
||||
eaarch64cloudabib.c \
|
||||
eaarch64fbsd.c \
|
||||
eaarch64fbsdb.c \
|
||||
eaarch64haiku.c \
|
||||
eaarch64linux.c \
|
||||
eaarch64linuxb.c \
|
||||
eaarch64linux32.c \
|
||||
@ -943,8 +946,8 @@ ALL_64_EMULATION_SOURCES = \
|
||||
eelf_k1om_fbsd.c \
|
||||
eelf_x86_64.c \
|
||||
eelf_x86_64_cloudabi.c \
|
||||
eelf_x86_64_fbsd.c \
|
||||
eelf_x86_64_haiku.c \
|
||||
eelf_x86_64_fbsd.c \
|
||||
eelf_x86_64_nacl.c \
|
||||
eelf_x86_64_sol2.c \
|
||||
ehppa64linux.c \
|
||||
@ -1203,6 +1206,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elfb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64fbsdb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64haiku.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64linux32b.Po@am__quote@
|
||||
@ -1224,6 +1228,7 @@ distclean-compile:
|
||||
@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_haiku.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_linux_fdpiceabi.Po@am__quote@
|
||||
@ -1342,6 +1347,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_fbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppchaiku.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppclinux.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcnto.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcsim.Po@am__quote@
|
||||
@ -1390,6 +1396,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_chaos.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_ldso.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_nacl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_sol2.Po@am__quote@
|
||||
@ -1399,10 +1406,12 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om_fbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om_fbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.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_haiku.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@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf.Po@am__quote@
|
||||
@ -2933,13 +2942,13 @@ eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \
|
||||
$(srcdir)/emultempl/solaris2.em \
|
||||
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_mipsel_haiku.c: $(srcdir)/emulparams/elf_mipsel_haiku.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
|
||||
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_mipsel_haiku.c: $(srcdir)/emulparams/elf_mipsel_haiku.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_iamcu.c: $(srcdir)/emulparams/elf_iamcu.sh \
|
||||
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
@ -3164,6 +3173,10 @@ eaarch64fbsdb.c: $(srcdir)/emulparams/aarch64fbsdb.sh $(srcdir)/emulparams/aarch
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64haiku.c: $(srcdir)/emulparams/aarch64haiku.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64linux.c: $(srcdir)/emulparams/aarch64linux.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
@ -3321,6 +3334,10 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
|
||||
eelf32_x86_64.c: $(srcdir)/emulparams/elf32_x86_64.sh \
|
||||
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_x86_64_haiku.c: $(srcdir)/emulparams/elf_x86_64_haiku.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf32_x86_64_nacl.c: $(srcdir)/emulparams/elf32_x86_64_nacl.sh \
|
||||
$(srcdir)/emulparams/elf32_x86_64.sh \
|
||||
$(srcdir)/emulparams/elf_nacl.sh \
|
||||
@ -3481,10 +3498,6 @@ eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_x86_64_haiku.c: $(srcdir)/emulparams/elf_x86_64_haiku.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_x86_64_nacl.c: $(srcdir)/emulparams/elf_x86_64_nacl.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(srcdir)/emulparams/elf_nacl.sh \
|
||||
|
@ -70,6 +70,8 @@ aarch64_be-*-linux*) targ_emul=aarch64linuxb
|
||||
aarch64-*-linux*) targ_emul=aarch64linux
|
||||
targ_extra_libpath="aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi"
|
||||
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb $targ_extra_libpath" ;;
|
||||
aarch64-*-haiku*) targ_emul=aarch64haiku
|
||||
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb armelf_haiku $targ_extra_libpath" ;;
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
targ_emul=elf64alpha_fbsd
|
||||
targ_extra_emuls="elf64alpha alpha"
|
||||
|
39
binutils/ld/emulparams/aarch64haiku.sh
Normal file
39
binutils/ld/emulparams/aarch64haiku.sh
Normal file
@ -0,0 +1,39 @@
|
||||
ARCH=aarch64
|
||||
MACHINE=
|
||||
NOP=0x1f2003d5
|
||||
|
||||
SCRIPT_NAME=elf
|
||||
ELFSIZE=64
|
||||
OUTPUT_FORMAT="elf64-littleaarch64"
|
||||
BIG_OUTPUT_FORMAT="elf64-bigaarch64"
|
||||
LITTLE_OUTPUT_FORMAT="elf64-littleaarch64"
|
||||
NO_REL_RELOCS=yes
|
||||
|
||||
TEMPLATE_NAME=elf32
|
||||
EXTRA_EM_FILE=aarch64elf
|
||||
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
|
||||
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
||||
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
|
||||
SEPARATE_GOTPLT=24
|
||||
IREL_IN_PLT=
|
||||
|
||||
TEXT_START_ADDR=0x400000
|
||||
|
||||
DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
|
||||
|
||||
# AArch64 does not support .s* sections.
|
||||
NO_SMALL_DATA=yes
|
||||
|
||||
OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
|
||||
OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
|
||||
OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
|
||||
|
||||
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
|
||||
ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
|
||||
# Ensure each PLT entry is aligned to a cache line.
|
||||
PLT=".plt ${RELOCATING-0} : ALIGN(16) { *(.plt)${RELOCATING+${IREL_IN_PLT+ *(.iplt)}} }"
|
||||
|
||||
. ${srcdir}/emulparams/elf_haiku.sh
|
Loading…
Reference in New Issue
Block a user