aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2011-05-13 18:15:33 +0000
committerBernd Schmidt <bernds@codesourcery.com>2011-05-13 18:15:33 +0000
commit2a6163793f685ef88ce57aa90fd9da291e64e1b7 (patch)
tree09c03e1b7ca255472ef658909ae1ad64acf65f5a /bfd
parent01124a23b32e1d40eefe063aa416438d71ba0240 (diff)
downloadgdb-2a6163793f685ef88ce57aa90fd9da291e64e1b7.zip
gdb-2a6163793f685ef88ce57aa90fd9da291e64e1b7.tar.gz
gdb-2a6163793f685ef88ce57aa90fd9da291e64e1b7.tar.bz2
ld/
(eelf32_tic6x_linux_be.c, eelf32_tic6x_linux_le.c, eelf32_tic6x_elf_be.c, eelf32_tic6x_elf_le.c): New rules. * Makefile.am (ALL_EMULATIONS): Add these files. (eelf32_tic6x_be.c, eelf32_tic6x_le.c): Depend on tic6xdsbt.em. * Makefile.in: Regenerated. * emultempl/tic6xdsbt.em (is_tic6x_target): Allow more tic6x target vectors. * emulparams/elf32_tic6x_elf_be.sh: New file. * emulparams/elf32_tic6x_elf_le.sh: New file. * emulparams/elf32_tic6x_linux_be.sh: New file. * emulparams/elf32_tic6x_linux_le.sh: New file. * configure.tgt (tic6x-*-elf, tic6x-*-uclinux): New. (tic6x-*-*): Replaced by these. ld/testsuite/ * ld-tic6x/dsbt.ld (OUTPUT_FORMAT): Add. * ld-tic6x/tic6x.exp: Add OSABI tests. bfd/ * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New. (tic6x-*-*): Replaced by these. * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function. (elf32_tic6x_check_relocs): Create dynamic sections if -shared. (elf_backend_relocs_compatible, elf_backend_post_process_headers): Define. (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM, TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include "elf32-target.h" two more times. * configure.in: Handle bfd_elf32_tic6x_linux_be_vec, bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and bfd_elf32_tic6x_elf_le_vec. * configure: Regenerate.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog16
-rw-r--r--bfd/config.bfd11
-rwxr-xr-xbfd/configure4
-rw-r--r--bfd/configure.in4
-rw-r--r--bfd/elf32-tic6x.c48
-rw-r--r--bfd/targets.c4
6 files changed, 83 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f929a9e..2ede7d3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,19 @@
+2011-05-13 Bernd Schmidt <bernds@codesourcery.com>
+
+ * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
+ (tic6x-*-*): Replaced by these.
+ * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
+ (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
+ (elf_backend_relocs_compatible, elf_backend_post_process_headers):
+ Define.
+ (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
+ TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
+ "elf32-target.h" two more times.
+ * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
+ bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
+ bfd_elf32_tic6x_elf_le_vec.
+ * configure: Regenerate.
+
2011-05-13 Jan Beulich <jbeulich@novell.com>
* config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 618bfdf..7e9f2d3 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1465,9 +1465,14 @@ case "${targ}" in
;;
#endif
- tic6x-*-*)
- targ_defvec=bfd_elf32_tic6x_le_vec
- targ_selvecs=bfd_elf32_tic6x_be_vec
+ tic6x-*-elf)
+ targ_defvec=bfd_elf32_tic6x_elf_le_vec
+ targ_selvecs="bfd_elf32_tic6x_elf_be_vec bfd_elf32_tic6x_le_vec bfd_elf32_tic6x_be_vec"
+ ;;
+
+ tic6x-*-uclinux)
+ targ_defvec=bfd_elf32_tic6x_linux_le_vec
+ targ_selvecs="bfd_elf32_tic6x_linux_be_vec bfd_elf32_tic6x_le_vec bfd_elf32_tic6x_be_vec"
;;
tic80*-*-*)
diff --git a/bfd/configure b/bfd/configure
index ac147ba..b56cc6b 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -15293,6 +15293,10 @@ do
bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tic6x_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
bfd_elf32_tic6x_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+ bfd_elf32_tic6x_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+ 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_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec)
diff --git a/bfd/configure.in b/bfd/configure.in
index 713edea..81939cd 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -792,6 +792,10 @@ do
bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tic6x_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
bfd_elf32_tic6x_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+ bfd_elf32_tic6x_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
+ 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_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec)
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
index fb710dc..efacfb9 100644
--- a/bfd/elf32-tic6x.c
+++ b/bfd/elf32-tic6x.c
@@ -2764,7 +2764,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Create dynamic sections for relocatable executables so that we can
copy relocations. */
- if (elf32_tic6x_using_dsbt (abfd)
+ if ((info->shared || elf32_tic6x_using_dsbt (abfd))
&& ! htab->elf.dynamic_sections_created)
{
if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
@@ -4439,6 +4439,14 @@ elf32_tic6x_write_section (bfd *output_bfd,
return TRUE;
}
+static void
+elf32_tic6x_set_osabi (bfd *abfd, struct bfd_link_info *link_info)
+{
+ if (link_info == NULL || link_info->relocatable)
+ return;
+ _bfd_elf_set_osabi (abfd, link_info);
+}
+
#define TARGET_LITTLE_SYM bfd_elf32_tic6x_le_vec
#define TARGET_LITTLE_NAME "elf32-tic6x-le"
#define TARGET_BIG_SYM bfd_elf32_tic6x_be_vec
@@ -4488,6 +4496,7 @@ elf32_tic6x_write_section (bfd *output_bfd,
#define elf_backend_section_from_bfd_section \
elf32_tic6x_section_from_bfd_section
#define elf_backend_relocate_section elf32_tic6x_relocate_section
+#define elf_backend_relocs_compatible _bfd_elf_relocs_compatible
#define elf_backend_finish_dynamic_symbol \
elf32_tic6x_finish_dynamic_symbol
#define elf_backend_always_size_sections \
@@ -4506,5 +4515,42 @@ elf32_tic6x_write_section (bfd *output_bfd,
#define elf_backend_omit_section_dynsym elf32_tic6x_link_omit_section_dynsym
#define elf_backend_plt_sym_val elf32_tic6x_plt_sym_val
+#include "elf32-target.h"
+
+#undef elf32_bed
+#define elf32_bed elf32_tic6x_linux_bed
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_tic6x_linux_le_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-tic6x-linux-le"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_tic6x_linux_be_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-tic6x-linux-be"
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_C6000_LINUX
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers elf32_tic6x_set_osabi
+
+#include "elf32-target.h"
+
+#undef elf32_bed
+#define elf32_bed elf32_tic6x_elf_bed
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_tic6x_elf_le_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-tic6x-elf-le"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_tic6x_elf_be_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-tic6x-elf-be"
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_C6000_ELFABI
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers elf32_tic6x_set_osabi
#include "elf32-target.h"
diff --git a/bfd/targets.c b/bfd/targets.c
index e491c93..3249867 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -683,6 +683,10 @@ extern const bfd_target bfd_elf32_sparc_vxworks_vec;
extern const bfd_target bfd_elf32_spu_vec;
extern const bfd_target bfd_elf32_tic6x_be_vec;
extern const bfd_target bfd_elf32_tic6x_le_vec;
+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_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
extern const bfd_target bfd_elf32_tradbigmips_freebsd_vec;