aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAndrew Turner <andrew@freebsd.org>2015-04-02 15:07:27 +0100
committerNick Clifton <nickc@redhat.com>2015-04-02 15:07:27 +0100
commit15c7659fd125da7d08cfe0f82f1795ab88f897d2 (patch)
treeaab03e0f69ded33791a83bc7d8682912a3f31811 /ld
parentc1baaddf8861aea666b84baeb4746caff51a579d (diff)
downloadgdb-15c7659fd125da7d08cfe0f82f1795ab88f897d2.zip
gdb-15c7659fd125da7d08cfe0f82f1795ab88f897d2.tar.gz
gdb-15c7659fd125da7d08cfe0f82f1795ab88f897d2.tar.bz2
Add support for configuring an aarch64-freebsd target.
ld * Makefile.am: Add FreeBSD aarch64 files. * Makefile.in: Regenerate. * configure.tgt: Add aarch64-*-freebsd* target triple. * emulparams/aarch64fbsd.sh: New file. * emulparams/aarch64fbsdb.sh: New file. bfd * config.bfd: Add aarch64-*-freebsd* target triple.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/Makefile.am10
-rw-r--r--ld/Makefile.in12
-rw-r--r--ld/configure.tgt2
-rw-r--r--ld/emulparams/aarch64fbsd.sh37
-rw-r--r--ld/emulparams/aarch64fbsdb.sh2
6 files changed, 71 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 1348f46..91e8c11 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,11 @@
+2015-04-02 Andrew Turner <andrew@freebsd.org>
+
+ * Makefile.am: Add FreeBSD aarch64 files.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add aarch64-*-freebsd* target triple.
+ * emulparams/aarch64fbsd.sh: New file.
+ * emulparams/aarch64fbsdb.sh: New file.
+
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 14cfedd..80c7487 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -426,6 +426,8 @@ ALL_64_EMULATION_SOURCES = \
eaarch64elf32.c \
eaarch64elfb.c \
eaarch64elf32b.c \
+ eaarch64fbsd.c \
+ eaarch64fbsdb.c \
eaarch64linux.c \
eaarch64linuxb.c \
eaarch64linux32.c \
@@ -1584,6 +1586,14 @@ eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aar
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
+eaarch64fbsdb.c: $(srcdir)/emulparams/aarch64fbsdb.sh $(srcdir)/emulparams/aarch64fbsd.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}
diff --git a/ld/Makefile.in b/ld/Makefile.in
index eba36a0..81159cb 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -751,6 +751,8 @@ ALL_64_EMULATION_SOURCES = \
eaarch64elf32.c \
eaarch64elfb.c \
eaarch64elf32b.c \
+ eaarch64fbsd.c \
+ eaarch64fbsdb.c \
eaarch64linux.c \
eaarch64linuxb.c \
eaarch64linux32.c \
@@ -1081,6 +1083,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elf32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eaarch64elf32b.Po@am__quote@
@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)/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@
@@ -3076,6 +3080,14 @@ eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aar
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eaarch64fbsd.c: $(srcdir)/emulparams/aarch64fbsd.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
+eaarch64fbsdb.c: $(srcdir)/emulparams/aarch64fbsdb.sh $(srcdir)/emulparams/aarch64fbsd.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}
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 4b967fe..4a45f14 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -49,6 +49,8 @@ aarch64_be-*-elf) targ_emul=aarch64elfb
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
aarch64-*-elf) targ_emul=aarch64elf
targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;;
+aarch64-*-freebsd*) targ_emul=aarch64fbsd
+ targ_extra_emuls="aarch64fbsdb aarch64elf" ;;
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" ;;
diff --git a/ld/emulparams/aarch64fbsd.sh b/ld/emulparams/aarch64fbsd.sh
new file mode 100644
index 0000000..b92bde9
--- /dev/null
+++ b/ld/emulparams/aarch64fbsd.sh
@@ -0,0 +1,37 @@
+ARCH=aarch64
+MACHINE=
+NOP=0
+
+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='__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)) }'
+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)${IREL_IN_PLT+ *(.iplt)} }"
diff --git a/ld/emulparams/aarch64fbsdb.sh b/ld/emulparams/aarch64fbsdb.sh
new file mode 100644
index 0000000..2c55dde
--- /dev/null
+++ b/ld/emulparams/aarch64fbsdb.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/aarch64fbsd.sh
+OUTPUT_FORMAT="elf64-bigaarch64"