aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorWalter Lee <walt@tilera.com>2012-02-25 19:51:34 +0000
committerWalter Lee <walt@tilera.com>2012-02-25 19:51:34 +0000
commitfb6ceddedd56805fc4fd64792a0e73baa8c22a21 (patch)
tree035d5e8c3f9a3be2c2b82f975fcde4e4074ba612 /ld/emulparams
parent825902491e89db303b036d82eef32ef0b07d4317 (diff)
downloadgdb-fb6ceddedd56805fc4fd64792a0e73baa8c22a21.zip
gdb-fb6ceddedd56805fc4fd64792a0e73baa8c22a21.tar.gz
gdb-fb6ceddedd56805fc4fd64792a0e73baa8c22a21.tar.bz2
Add big-endian support for tilegx.
bfd/ * config.bfd (tilegx-*-*): rename little endian vector; add big endian vector. (tilegxbe-*-*): New case. * configure.in (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): New vector. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): New vector. * configure: Regenerate. * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * targets.c (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): Declare. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): Declare. (_bfd_target_vector): Add / rename above vectors. binutils/testsuite/ * binutils-all/objdump.exp (cpus_expected): Add tilegx. gas/ * tc-tilegx.c (tilegx_target_format): Handle big endian. (OPTION_EB): Define. (OPTION_EL): Define. (md_longopts): Add entries for "EB" and "EL". (md_parse_option): Handle OPTION_EB and OPTION_EL. (md_show_usage): Add -EB and -EL. (md_number_to_chars): New. * tc-tilegx.h (TARGET_BYTES_BIG_ENDIAN): Guard definition with ifndef. (md_number_to_chars): Delete. * configure.tgt (tilegx*be): Handle. * doc/as.texinfo [TILE-Gx]: Document -EB and -EL. * doc/c-tilegx.texi: Ditto. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32tilegx_be.c. (ALL_64_EMULATION_SOURCES): Add eelf64tilegx_be.c. (eelf32tilegx_be.c): Add rule to build this file. (eelf64tilegx_be.c): Ditto. * Makefile.in: Regenerate. * configure.tgt (tilegx-*-*): Support big endian. (tilegxbe-*-*): New. * emulparams/elf32tilegx.sh (OUTPUT_FORMAT): Rename. (BIG_OUTPUT_FORMAT): Define. (LITTLE_OUTPUT_FORMAT): Define. * emulparams/elf32tilegx_be.sh: New. * emulparams/elf64tilegx.sh (OUTPUT_FORMAT): Rename. (BIG_OUTPUT_FORMAT): Define. (LITTLE_OUTPUT_FORMAT): Define. * emulparams/elf64tilegx_be.sh: New. ld/testsuite/ * ld-tilegx/reloc-be.d: New. * ld-tilegx/reloc-le.d: New. * ld-tilegx/reloc.d: Delete. * ld-tilegx/tilegx.exp: Test big and little endian.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf32tilegx.sh4
-rw-r--r--ld/emulparams/elf32tilegx_be.sh2
-rw-r--r--ld/emulparams/elf64tilegx.sh4
-rw-r--r--ld/emulparams/elf64tilegx_be.sh2
4 files changed, 10 insertions, 2 deletions
diff --git a/ld/emulparams/elf32tilegx.sh b/ld/emulparams/elf32tilegx.sh
index 0b32262..92121e7 100644
--- a/ld/emulparams/elf32tilegx.sh
+++ b/ld/emulparams/elf32tilegx.sh
@@ -1,5 +1,7 @@
SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-tilegx"
+OUTPUT_FORMAT="elf32-tilegx-le"
+BIG_OUTPUT_FORMAT="elf32-tilegx-be"
+LITTLE_OUTPUT_FORMAT="elf32-tilegx-le"
TEXT_START_ADDR=0x10000
NO_REL_RELOCS=yes
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/elf32tilegx_be.sh b/ld/emulparams/elf32tilegx_be.sh
new file mode 100644
index 0000000..e3ea498
--- /dev/null
+++ b/ld/emulparams/elf32tilegx_be.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/elf32tilegx.sh
+OUTPUT_FORMAT="elf32-tilegx-be"
diff --git a/ld/emulparams/elf64tilegx.sh b/ld/emulparams/elf64tilegx.sh
index a2c407e..6ac9fa8 100644
--- a/ld/emulparams/elf64tilegx.sh
+++ b/ld/emulparams/elf64tilegx.sh
@@ -1,5 +1,7 @@
SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf64-tilegx"
+OUTPUT_FORMAT="elf64-tilegx-le"
+BIG_OUTPUT_FORMAT="elf64-tilegx-be"
+LITTLE_OUTPUT_FORMAT="elf64-tilegx-le"
TEXT_START_ADDR=0x10000
NO_REL_RELOCS=yes
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/elf64tilegx_be.sh b/ld/emulparams/elf64tilegx_be.sh
new file mode 100644
index 0000000..dd0347d
--- /dev/null
+++ b/ld/emulparams/elf64tilegx_be.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/elf64tilegx.sh
+OUTPUT_FORMAT="elf64-tilegx-be"