aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-05-11 11:27:34 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-05-11 11:29:03 -0700
commit7e0a81123db953de03f6482f7c10f306407d348e (patch)
tree9424acbc5c5582716cf20d6f102f080c31e7c4cb /ld/emulparams
parent814860358c2e4194d372018dd1ae78b5c95a44d0 (diff)
downloadgdb-7e0a81123db953de03f6482f7c10f306407d348e.zip
gdb-7e0a81123db953de03f6482f7c10f306407d348e.tar.gz
gdb-7e0a81123db953de03f6482f7c10f306407d348e.tar.bz2
Add Intel MCU support to ld
-m elf_iamcu must be passed to i386 linker to generate Intel MCU binary. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_iamcu.c. (eelf_iamcu.c): New. * configure.tgt (targ_extra_emuls): Add elf_iamcu if elf_i386 is enabled in BFD. * Makefile.in: Regenerated. * emulparams/elf_iamcu.sh: New file. ld/testsuite/ * ld-i386/abs-iamcu.d: New file. * ld-i386/dummy.s: Likewise. * ld-i386/foo.s: Likewise. * ld-i386/iamcu-1.d: Likewise. * ld-i386/iamcu-2.d: Likewise. * ld-i386/iamcu-3.d: Likewise. * ld-i386/start.s: Likewise. * ld-i386/i386.exp (iamcu_tests): New. Run iamcu_tests.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf_iamcu.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/ld/emulparams/elf_iamcu.sh b/ld/emulparams/elf_iamcu.sh
new file mode 100644
index 0000000..adab897
--- /dev/null
+++ b/ld/emulparams/elf_iamcu.sh
@@ -0,0 +1,33 @@
+. ${srcdir}/emulparams/plt_unwind.sh
+. ${srcdir}/emulparams/extern_protected_data.sh
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-iamcu"
+NO_RELA_RELOCS=yes
+TEXT_START_ADDR=0x08048000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+ARCH=iamcu
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+NO_SMALL_DATA=yes
+SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0"
+IREL_IN_PLT=
+# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
+TINY_READONLY_SECTION="
+.plt.got ${RELOCATING-0} : { *(.plt.got) }
+"
+
+# Linux modify the default library search path to first include
+# a 32-bit specific directory.
+case "$target" in
+ x86_64*-linux* | i[3-7]86*-linux*)
+ case "$EMULATION_NAME" in
+ *i386*)
+ LIBPATH_SUFFIX=32
+ LIBPATH_SUFFIX_SKIP=64
+ ;;
+ esac
+ ;;
+esac