aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-11-09 17:00:44 +0000
committerNick Clifton <nickc@redhat.com>2012-11-09 17:00:44 +0000
commit708e2187a341e9eee46669dbb8c4d6603be5cf40 (patch)
tree2f156302c2faa127189b6ba700d2707e213964db /gas
parentf23200ada9c9f078722cd78ae3fd595c65b8b83a (diff)
downloadgdb-708e2187a341e9eee46669dbb8c4d6603be5cf40.zip
gdb-708e2187a341e9eee46669dbb8c4d6603be5cf40.tar.gz
gdb-708e2187a341e9eee46669dbb8c4d6603be5cf40.tar.bz2
2012-11-09 Nick Clifton <nickc@redhat.com>
* elf32-rx.c (describe_flags): New function. Returns a buffer containing a description of the E_FLAG_RX_... values set. (rx_elf_merge_private_bfd_data): Use it. (rx_elf_print_private_bfd_data): Likewise. (elf32_rx_machine): Skip EF_RX_CPU_RX check. (elf32_rx_special_sections): Define. (elf_backend_special_sections): Define. 2012-11-09 Nick Clifton <nickc@redhat.com> * readelf.c (get_machine_flags): Add support for E_FLAG_RX_ABI. 2012-11-09 Nick Clifton <nickc@redhat.com> * config/obj-elf.c (obj_elf_change_section): Allow init array sections to have the SHF_EXECINSTR attribute for the RX target. * config/tc-rx.c (elf_flags): Initialise with E_FLAG_RX_ABI. (enum options): Add OPTION_USES_GCC_ABI and OPTION_USES_RX_ABI. (md_longopts): Add -mgcc-abi and -mrx-abi. (md_parse_option): Add support for OPTION_USES_GCC_ABI and OPTION_USES_RX_ABI. * doc/as.texinfo (RX Options): Add mention of remaining RX options. * doc/c-rx.texi: Document -mgcc-abi and -mrx-abi. 2012-11-09 Nick Clifton <nickc@redhat.com> * rx.h (EF_RX_CPU_RX): Add comment. (E_FLAG_RX_ABI): Define. 2012-11-09 Nick Clifton <nickc@redhat.com> * emultempl/rxelf.em (no_flag_mismatch_warnings): Initialise to true. (PARSE_AND_LIST_LONGOPTS): Add flag-mismatch-warnings. (PARSE_AND_LIST_ARG_CASES): Add support for --flag-mismatch-warnings.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog13
-rw-r--r--gas/config/obj-elf.c8
-rw-r--r--gas/config/tc-rx.c14
-rw-r--r--gas/doc/as.texinfo6
-rw-r--r--gas/doc/c-rx.texi13
5 files changed, 53 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ddf1a1e..ce6c114 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,16 @@
+2012-11-09 Nick Clifton <nickc@redhat.com>
+
+ * config/obj-elf.c (obj_elf_change_section): Allow init array
+ sections to have the SHF_EXECINSTR attribute for the RX target.
+ * config/tc-rx.c (elf_flags): Initialise with E_FLAG_RX_ABI.
+ (enum options): Add OPTION_USES_GCC_ABI and OPTION_USES_RX_ABI.
+ (md_longopts): Add -mgcc-abi and -mrx-abi.
+ (md_parse_option): Add support for OPTION_USES_GCC_ABI and
+ OPTION_USES_RX_ABI.
+ * doc/as.texinfo (RX Options): Add mention of remaining RX
+ options.
+ * doc/c-rx.texi: Document -mgcc-abi and -mrx-abi.
+
2012-11-09 David Holsgrove <david.holsgrove@xilinx.com>
* gas/microblaze/endian.exp: New file - endian testcase for microblaze / microblazeel.
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;
}
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 67233f0..8c43940 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -459,6 +459,12 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@emph{Target RX options:}
[@b{-mlittle-endian}|@b{-mbig-endian}]
[@b{-m32bit-doubles}|@b{-m64bit-doubles}]
+ [@b{-muse-conventional-section-names}]
+ [@b{-msmall-data-limit}]
+ [@b{-mpid}]
+ [@b{-mrelax}]
+ [@b{-mint-register=@var{number}}]
+ [@b{-mgcc-abi}|@b{-mrx-abi}]
@end ifset
@ifset S390
diff --git a/gas/doc/c-rx.texi b/gas/doc/c-rx.texi
index 5f9239b..d6390c8 100644
--- a/gas/doc/c-rx.texi
+++ b/gas/doc/c-rx.texi
@@ -93,6 +93,19 @@ This option tells the assembler how many registers have been reserved
for use by interrupt handlers. This is needed in order to compute the
correct values for the @code{%gpreg} and @code{%pidreg} meta registers.
+@cindex @samp{-mgcc-abi}
+@item -mgcc-abi
+This option tells the assembler that the old GCC ABI is being used by
+the assembled code. With this version of the ABI function arguments
+that are passed on the stack are aligned to a 32-bit boundary.
+
+@cindex @samp{-mrx-abi}
+@item -mrx-abi
+This option tells the assembler that the official RX ABI is being used
+by the assembled code. With this version of the ABI function
+arguments that are passed on the stack are aligned to their natural
+alignments. This option is the default.
+
@end table
@node RX-Modifiers