aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2018-03-20 10:54:26 +0100
committerChristophe Lyon <christophe.lyon@linaro.org>2018-04-25 20:47:43 +0000
commit617a5ada88c7d4b6aae201ad5b295f3d2ef07c10 (patch)
treef827954e3595fb42d32cde87ade864e6b918d2b1 /ld
parent249b57335279b1051456884f1a908cdec907f43a (diff)
downloadgdb-617a5ada88c7d4b6aae201ad5b295f3d2ef07c10.zip
gdb-617a5ada88c7d4b6aae201ad5b295f3d2ef07c10.tar.gz
gdb-617a5ada88c7d4b6aae201ad5b295f3d2ef07c10.tar.bz2
[ARM] Add armelf_linux_fdpiceabi and armelfb_linux_fdpiceabi BFD backends
Initial definition of these new backends. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. Accept arm*-*-uclinuxfdpiceabi. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_linux_fdpiceabi.c and earmelfb_linux_fdpiceabi.c. (earmelf_linux_fdpiceabi.c, earmelfb_linux_fdpiceabi.c): New rules. * Makefile.in: Regenerate. * configure.tgt (arm*-*-uclinuxfdpiceabi): Handle new target. * emulparams/armelf_linux_fdpiceabi.sh: New. * emulparams/armelfb_linux_fdpiceabi.sh: New.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog11
-rw-r--r--ld/Makefile.am13
-rw-r--r--ld/Makefile.in15
-rw-r--r--ld/configure.tgt7
-rw-r--r--ld/emulparams/armelf_linux_fdpiceabi.sh13
-rw-r--r--ld/emulparams/armelfb_linux_fdpiceabi.sh2
6 files changed, 60 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 23843c1..e633941 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,14 @@
+2018-04-25 Christophe Lyon <christophe.lyon@st.com>
+ Mickaël Guêné <mickael.guene@st.com>
+
+ * Makefile.am (ALL_EMULATION_SOURCES): Add
+ earmelf_linux_fdpiceabi.c and earmelfb_linux_fdpiceabi.c.
+ (earmelf_linux_fdpiceabi.c, earmelfb_linux_fdpiceabi.c): New rules.
+ * Makefile.in: Regenerate.
+ * configure.tgt (arm*-*-uclinuxfdpiceabi): Handle new target.
+ * emulparams/armelf_linux_fdpiceabi.sh: New.
+ * emulparams/armelfb_linux_fdpiceabi.sh: New.
+
2018-04-25 Alan Modra <amodra@gmail.com>
* Makefile.am: Remove arm-aout and arm-coff support.
diff --git a/ld/Makefile.am b/ld/Makefile.am
index a905b15..6464e10 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -172,6 +172,7 @@ ALL_EMULATION_SOURCES = \
earmelf_fuchsia.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
+ earmelf_linux_fdpiceabi.c \
earmelf_nacl.c \
earmelf_nbsd.c \
earmelf_phoenix.c \
@@ -181,6 +182,7 @@ ALL_EMULATION_SOURCES = \
earmelfb_fuchsia.c \
earmelfb_linux.c \
earmelfb_linux_eabi.c \
+ earmelfb_linux_fdpiceabi.c \
earmelfb_nacl.c \
earmelfb_nbsd.c \
earmnto.c \
@@ -703,6 +705,11 @@ earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+earmelf_linux_fdpiceabi.c: $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
@@ -749,6 +756,12 @@ earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+earmelfb_linux_fdpiceabi.c: $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \
+ $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \
$(srcdir)/emulparams/armelf_nacl.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index d2201ac..8e0122c 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -541,6 +541,7 @@ ALL_EMULATION_SOURCES = \
earmelf_fuchsia.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
+ earmelf_linux_fdpiceabi.c \
earmelf_nacl.c \
earmelf_nbsd.c \
earmelf_phoenix.c \
@@ -550,6 +551,7 @@ ALL_EMULATION_SOURCES = \
earmelfb_fuchsia.c \
earmelfb_linux.c \
earmelfb_linux_eabi.c \
+ earmelfb_linux_fdpiceabi.c \
earmelfb_nacl.c \
earmelfb_nbsd.c \
earmnto.c \
@@ -1086,6 +1088,7 @@ distclean-compile:
@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_linux_fdpiceabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix.Po@am__quote@
@@ -1095,6 +1098,7 @@ distclean-compile:
@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_linux_fdpiceabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nacl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Po@am__quote@
@@ -2202,6 +2206,11 @@ earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+earmelf_linux_fdpiceabi.c: $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
@@ -2248,6 +2257,12 @@ earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+earmelfb_linux_fdpiceabi.c: $(srcdir)/emulparams/armelfb_linux_fdpiceabi.sh \
+ $(srcdir)/emulparams/armelf_linux_fdpiceabi.sh \
+ $(srcdir)/emulparams/armelf_linux.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
earmelfb_nacl.c: $(srcdir)/emulparams/armelfb_nacl.sh \
$(srcdir)/emulparams/armelf_nacl.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 1b45611..1999010 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -129,7 +129,12 @@ arm*b-*-linux-*) targ_emul=armelfb_linux
targ_extra_libpath="armelf_linux"
;;
arm*-*-linux-*eabi*) targ_emul=armelf_linux_eabi
- targ_extra_emuls=armelfb_linux_eabi
+ targ_extra_emuls="armelfb_linux_eabi"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*-*-uclinuxfdpiceabi)
+ targ_emul=armelf_linux_eabi
+ targ_extra_emuls="armelfb_linux_eabi armelf_linux_fdpiceabi armelfb_linux_fdpiceabi"
targ_extra_libpath=$targ_extra_emuls
;;
arm*-*-linux-*) targ_emul=armelf_linux
diff --git a/ld/emulparams/armelf_linux_fdpiceabi.sh b/ld/emulparams/armelf_linux_fdpiceabi.sh
new file mode 100644
index 0000000..104cf38
--- /dev/null
+++ b/ld/emulparams/armelf_linux_fdpiceabi.sh
@@ -0,0 +1,13 @@
+. ${srcdir}/emulparams/armelf_linux.sh
+
+OUTPUT_FORMAT="elf32-littlearm-fdpic"
+BIG_OUTPUT_FORMAT="elf32-bigarm-fdpic"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm-fdpic"
+
+# 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_linux_fdpiceabi.sh b/ld/emulparams/armelfb_linux_fdpiceabi.sh
new file mode 100644
index 0000000..988ea7a
--- /dev/null
+++ b/ld/emulparams/armelfb_linux_fdpiceabi.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/armelf_linux_fdpiceabi.sh
+OUTPUT_FORMAT="elf32-bigarm-fdpic"