aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorMichael Eager <eager@eagercon.com>2012-11-09 16:25:12 +0000
committerMichael Eager <eager@eagercon.com>2012-11-09 16:25:12 +0000
commitf23200ada9c9f078722cd78ae3fd595c65b8b83a (patch)
treeaed0fac44abd1b4b96d34ad07f66dcc4d6f29d6d /gas/config
parent0570af4ff1efdff03b836fccbdbdc4b8a68ba53d (diff)
downloadgdb-f23200ada9c9f078722cd78ae3fd595c65b8b83a.zip
gdb-f23200ada9c9f078722cd78ae3fd595c65b8b83a.tar.gz
gdb-f23200ada9c9f078722cd78ae3fd595c65b8b83a.tar.bz2
Add microblazeel target support to bfd, gas and ld.
binutils/bfd/Changelog 2012-11-09 Edgar E. Iglesias <edgar.iglesias@gmail.com> * config.bfd: Add microblazeel-*-* * configure.in: Likewise. * configure: Regenerate. * elf32-microblaze.c (microblaze_elf_relocate_section): Add endian awareness. (microblaze_elf_merge_private_bfd_data): New. (microblaze_bfd_write_imm_value_32): New. (microblaze_bfd_write_imm_value_64): New. (microblaze_elf_relax_section): Add endian awareness. (microblaze_elf_add_symbol_hook): Define TARGET_LITTLE_NAME, TARGET_LITTLE_SYM and bfd_elf32_bfd_merge_private_bfd_data. * targets.c: Add bfd target bfd_elf32_microblazeel_vec. binutils/gas/Changelog 2012-11-09 Edgar E. Iglesias <edgar.iglesias@gmail.com> * tc-microblaze.c (md_longopts): Define OPTION_EB and OPTION_EL for target. (md_parse_option): Likewise. * tc-microblaze.h: Set elf32-microblazeel if not target_big_endian for TARGET_FORMAT. * configure.tgt: Add microblazeel and set endian per target. binutils/gas/testsuite/Changelog 2012-11-09 David Holsgrove <david.holsgrove@xilinx.com> * gas/microblaze/endian.exp: New file - endian testcase for microblaze / microblazeel. * gas/microblaze/endian.s: Likewise. * gas/microblaze/endian_be.d: Likewise. * gas/microblaze/endian_le.d: Likewise. * gas/microblaze/endian_le_elf.d: Likewise. * gas/microblaze/reloc_sym.d: Update to accept targets other than elf32-microblaze. * gas/microblaze/special_reg.d: Likewise. binutils/ld/Changelog 2012-11-09 Edgar E. Iglesias <edgar.iglesias@gmail.com> * Makefile.am: Add eelf32microblazeel.c and eelf32mbel_linux.c. * Makefile.in: Regenerated. * configure.tgt: Add microblazeel and set endian per target. * emulparams/elf32mb_linux.sh: Add OUTPUT_FORMAT. * emulparams/elf32microblaze.sh: Likewise. * emulparams/elf32mbel_linux.sh: New file. * emulparams/elf32microblazeel.sh: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-microblaze.c11
-rw-r--r--gas/config/tc-microblaze.h4
2 files changed, 14 insertions, 1 deletions
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index de0efda..04dfa1e 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -35,6 +35,9 @@
#define streq(a,b) (strcmp (a, b) == 0)
#endif
+#define OPTION_EB (OPTION_MD_BASE + 0)
+#define OPTION_EL (OPTION_MD_BASE + 1)
+
void microblaze_generate_symbol (char *sym);
static bfd_boolean check_spl_reg (unsigned *);
@@ -1707,6 +1710,8 @@ const char * md_shortopts = "";
struct option md_longopts[] =
{
+ {"EB", no_argument, NULL, OPTION_EB},
+ {"EL", no_argument, NULL, OPTION_EL},
{ NULL, no_argument, NULL, 0}
};
@@ -2304,6 +2309,12 @@ md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
+ case OPTION_EB:
+ target_big_endian = 1;
+ break;
+ case OPTION_EL:
+ target_big_endian = 0;
+ break;
default:
return 0;
}
diff --git a/gas/config/tc-microblaze.h b/gas/config/tc-microblaze.h
index db8d227..0651040 100644
--- a/gas/config/tc-microblaze.h
+++ b/gas/config/tc-microblaze.h
@@ -23,8 +23,10 @@
#define TC_MICROBLAZE 1
#define TARGET_ARCH bfd_arch_microblaze
+#ifndef TARGET_BYTES_BIG_ENDIAN
/* Used to initialise target_big_endian. */
#define TARGET_BYTES_BIG_ENDIAN 1
+#endif
#define IGNORE_NONSTANDARD_ESCAPES
@@ -75,7 +77,7 @@ extern const struct relax_type md_relax_table[];
#ifdef OBJ_ELF
-#define TARGET_FORMAT (target_big_endian ? "elf32-microblaze" : "elf32-microblaze-little")
+#define TARGET_FORMAT (target_big_endian ? "elf32-microblaze" : "elf32-microblazeel")
#define ELF_TC_SPECIAL_SECTIONS \
{ ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \