aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/obj-elf.c8
-rw-r--r--gas/config/tc-rx.c14
2 files changed, 21 insertions, 1 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index d7c7665..d0fbcfb 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -658,6 +658,14 @@ obj_elf_change_section (const char *name,
else if ((attr & ~ssect->attr) == SHF_ALPHA_GPREL)
override = TRUE;
#endif
+#ifdef TC_RX
+ else if (attr == (SHF_EXECINSTR | SHF_WRITE | SHF_ALLOC)
+ && (ssect->type == SHT_INIT_ARRAY
+ || ssect->type == SHT_FINI_ARRAY
+ || ssect->type == SHT_PREINIT_ARRAY))
+ /* RX init/fini arrays can and should have the "awx" attributes set. */
+ ;
+#endif
else
{
if (group_name == NULL)
diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index 3db8fe1..b1d0b20 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -46,7 +46,7 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
/* ELF flags to set in the output file header. */
-static int elf_flags = 0;
+static int elf_flags = E_FLAG_RX_ABI;
bfd_boolean rx_use_conventional_section_names = FALSE;
static bfd_boolean rx_use_small_data_limit = FALSE;
@@ -70,6 +70,8 @@ enum options
OPTION_RELAX,
OPTION_PID,
OPTION_INT_REGS,
+ OPTION_USES_GCC_ABI,
+ OPTION_USES_RX_ABI,
};
#define RX_SHORTOPTS ""
@@ -94,6 +96,8 @@ struct option md_longopts[] =
{"relax", no_argument, NULL, OPTION_RELAX},
{"mpid", no_argument, NULL, OPTION_PID},
{"mint-register", required_argument, NULL, OPTION_INT_REGS},
+ {"mgcc-abi", no_argument, NULL, OPTION_USES_GCC_ABI},
+ {"mrx-abi", no_argument, NULL, OPTION_USES_RX_ABI},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
@@ -143,6 +147,14 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED)
case OPTION_INT_REGS:
rx_num_int_regs = atoi (optarg);
return 1;
+
+ case OPTION_USES_GCC_ABI:
+ elf_flags &= ~ E_FLAG_RX_ABI;
+ return 1;
+
+ case OPTION_USES_RX_ABI:
+ elf_flags |= E_FLAG_RX_ABI;
+ return 1;
}
return 0;
}