diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-microblaze.c | 11 | ||||
-rw-r--r-- | gas/config/tc-microblaze.h | 4 |
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 }, \ |