Commit: RX: Add support for alternate ABI

Nick Clifton
Fri Nov 9 16:58:00 GMT 2012

Hi Guys,

  I am checking in the patch below to fix a couple of problems with the
  RX target and to add support for a GCC patch which corrects the
  implementation of the ABI.  The bugs fixed are:

    * The EF_RX_CPU_RX flag conflicts with the E_FLAG_RX_... flags.
      This needs to be sorted out (by Renesas choosing which values they
      want to use), but in the meantime the patch means that RX binaries
      from other compilers will still be recognised.

    * The .init_array, .fini_array and .preinit_array sections need to
      be marked as containing code so that their contents will not be
      byte swapped when the linker is generating big-endian data code.

  The GCC patch is to fix an ABI implementation bug.  Since this means
  producing binaries with a changed/fixed ABI, it is helpful to be able
  to determine which ABI implementation a particular binary is using.
  This patch adds that support to the assembler and linker.
  Tested with no regressions on an rx-elf target.


2012-11-09  Nick Clifton  <>

	* 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  <>

	* readelf.c (get_machine_flags): Add support for E_FLAG_RX_ABI.

2012-11-09  Nick Clifton  <>

	* 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
	* doc/as.texinfo (RX Options): Add mention of remaining RX
	* doc/c-rx.texi: Document -mgcc-abi and -mrx-abi.

2012-11-09  Nick Clifton  <>

	* rx.h (EF_RX_CPU_RX): Add comment.
	(E_FLAG_RX_ABI): Define.

2012-11-09  Nick Clifton  <>

	* emultempl/rxelf.em (no_flag_mismatch_warnings): Initialise to
	(PARSE_AND_LIST_LONGOPTS): Add flag-mismatch-warnings.
	(PARSE_AND_LIST_ARG_CASES): Add support for

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rx.binutils.patch
Type: text/x-patch
Size: 11960 bytes
Desc: not available
URL: <>

More information about the Binutils mailing list