diff options
author | Walter Lee <walt@tilera.com> | 2012-02-25 19:51:34 +0000 |
---|---|---|
committer | Walter Lee <walt@tilera.com> | 2012-02-25 19:51:34 +0000 |
commit | fb6ceddedd56805fc4fd64792a0e73baa8c22a21 (patch) | |
tree | 035d5e8c3f9a3be2c2b82f975fcde4e4074ba612 /bfd | |
parent | 825902491e89db303b036d82eef32ef0b07d4317 (diff) | |
download | gdb-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 'bfd')
-rw-r--r-- | bfd/ChangeLog | 27 | ||||
-rw-r--r-- | bfd/config.bfd | 8 | ||||
-rwxr-xr-x | bfd/configure | 6 | ||||
-rw-r--r-- | bfd/configure.in | 6 | ||||
-rw-r--r-- | bfd/elf32-tilegx.c | 6 | ||||
-rw-r--r-- | bfd/elf64-tilegx.c | 7 | ||||
-rw-r--r-- | bfd/targets.c | 12 |
7 files changed, 57 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2568c32..2af9699 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,9 +1,34 @@ 2012-02-25 Walter Lee <walt@tilera.com> + * 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. * arctures.c (bfd_architecture): Define bfd_mach_tilegx32. * bfd-in2.h: Regenerate. * cpu-tilegx.c (bfd_tilegx32_arch): define. - (bfd_tilegx_arch): link to bfd_tilegx32_arch. + (bfd_tilegx_arch): link to bfd_tilegx32_arch. 2012-02-24 Nick Clifton <nickc@redhat.com> diff --git a/bfd/config.bfd b/bfd/config.bfd index bd4e20e..2cf89ed 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1507,8 +1507,12 @@ case "${targ}" in #ifdef BFD64 tilegx-*-*) - targ_defvec=bfd_elf64_tilegx_vec - targ_selvecs=bfd_elf32_tilegx_vec + targ_defvec=bfd_elf64_tilegx_le_vec + targ_selvecs="bfd_elf64_tilegx_be_vec bfd_elf32_tilegx_be_vec bfd_elf32_tilegx_le_vec" + ;; + tilegxbe-*-*) + targ_defvec=bfd_elf64_tilegx_be_vec + targ_selvecs="bfd_elf64_tilegx_le_vec bfd_elf32_tilegx_be_vec bfd_elf32_tilegx_le_vec" ;; #endif diff --git a/bfd/configure b/bfd/configure index a2cd675..dc2a63c 100755 --- a/bfd/configure +++ b/bfd/configure @@ -15302,7 +15302,8 @@ do bfd_elf32_tic6x_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; bfd_elf32_tic6x_elf_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; bfd_elf32_tic6x_elf_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - bfd_elf32_tilegx_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; + bfd_elf32_tilegx_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; + bfd_elf32_tilegx_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; bfd_elf32_tilepro_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;; bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; @@ -15341,7 +15342,8 @@ do bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_tilegx_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; + bfd_elf64_tilegx_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; + bfd_elf64_tilegx_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec) diff --git a/bfd/configure.in b/bfd/configure.in index fc94c34..d6f3fe3 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -801,7 +801,8 @@ do bfd_elf32_tic6x_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; bfd_elf32_tic6x_elf_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; bfd_elf32_tic6x_elf_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - bfd_elf32_tilegx_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; + bfd_elf32_tilegx_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; + bfd_elf32_tilegx_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; bfd_elf32_tilepro_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;; bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; @@ -840,7 +841,8 @@ do bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_tilegx_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; + bfd_elf64_tilegx_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; + bfd_elf64_tilegx_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec) diff --git a/bfd/elf32-tilegx.c b/bfd/elf32-tilegx.c index 902e9ba..1b4884b 100644 --- a/bfd/elf32-tilegx.c +++ b/bfd/elf32-tilegx.c @@ -87,8 +87,10 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define ELF_MAXPAGESIZE 0x10000 #define ELF_COMMONPAGESIZE 0x10000 -#define TARGET_LITTLE_SYM bfd_elf32_tilegx_vec -#define TARGET_LITTLE_NAME "elf32-tilegx" +#define TARGET_BIG_SYM bfd_elf32_tilegx_be_vec +#define TARGET_BIG_NAME "elf32-tilegx-be" +#define TARGET_LITTLE_SYM bfd_elf32_tilegx_le_vec +#define TARGET_LITTLE_NAME "elf32-tilegx-le" #define elf_backend_reloc_type_class tilegx_reloc_type_class diff --git a/bfd/elf64-tilegx.c b/bfd/elf64-tilegx.c index e30ca80..bd5f653 100644 --- a/bfd/elf64-tilegx.c +++ b/bfd/elf64-tilegx.c @@ -87,8 +87,11 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define ELF_MAXPAGESIZE 0x10000 #define ELF_COMMONPAGESIZE 0x10000 -#define TARGET_LITTLE_SYM bfd_elf64_tilegx_vec -#define TARGET_LITTLE_NAME "elf64-tilegx" + +#define TARGET_BIG_SYM bfd_elf64_tilegx_be_vec +#define TARGET_BIG_NAME "elf64-tilegx-be" +#define TARGET_LITTLE_SYM bfd_elf64_tilegx_le_vec +#define TARGET_LITTLE_NAME "elf64-tilegx-le" #define elf_backend_reloc_type_class tilegx_reloc_type_class diff --git a/bfd/targets.c b/bfd/targets.c index 4cf8e8f..e5d08af 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -704,7 +704,8 @@ extern const bfd_target bfd_elf32_tic6x_elf_be_vec; extern const bfd_target bfd_elf32_tic6x_elf_le_vec; extern const bfd_target bfd_elf32_tic6x_linux_be_vec; extern const bfd_target bfd_elf32_tic6x_linux_le_vec; -extern const bfd_target bfd_elf32_tilegx_vec; +extern const bfd_target bfd_elf32_tilegx_be_vec; +extern const bfd_target bfd_elf32_tilegx_le_vec; extern const bfd_target bfd_elf32_tilepro_vec; extern const bfd_target bfd_elf32_tradbigmips_vec; extern const bfd_target bfd_elf32_tradlittlemips_vec; @@ -743,7 +744,8 @@ extern const bfd_target bfd_elf64_sh64nbsd_vec; extern const bfd_target bfd_elf64_sparc_vec; extern const bfd_target bfd_elf64_sparc_freebsd_vec; extern const bfd_target bfd_elf64_sparc_sol2_vec; -extern const bfd_target bfd_elf64_tilegx_vec; +extern const bfd_target bfd_elf64_tilegx_be_vec; +extern const bfd_target bfd_elf64_tilegx_le_vec; extern const bfd_target bfd_elf64_tradbigmips_vec; extern const bfd_target bfd_elf64_tradlittlemips_vec; extern const bfd_target bfd_elf64_tradbigmips_freebsd_vec; @@ -1073,7 +1075,8 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf32_spu_vec, &bfd_elf32_tic6x_be_vec, &bfd_elf32_tic6x_le_vec, - &bfd_elf32_tilegx_vec, + &bfd_elf32_tilegx_be_vec, + &bfd_elf32_tilegx_le_vec, &bfd_elf32_tilepro_vec, &bfd_elf32_tradbigmips_vec, &bfd_elf32_tradlittlemips_vec, @@ -1113,7 +1116,8 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf64_sparc_vec, &bfd_elf64_sparc_freebsd_vec, &bfd_elf64_sparc_sol2_vec, - &bfd_elf64_tilegx_vec, + &bfd_elf64_tilegx_be_vec, + &bfd_elf64_tilegx_le_vec, &bfd_elf64_tradbigmips_vec, &bfd_elf64_tradlittlemips_vec, &bfd_elf64_tradbigmips_freebsd_vec, |