Commit: RX: Add support for Position Independent Data

Nick Clifton nickc@redhat.com
Wed Oct 5 14:07:00 GMT 2011


Hi Guys,

  I am checking in the patch below to add support for RX code which has
  been compiled with a Position Independent Data feature enabled.  (I will
  be applying a patch to add this support to gcc shortly).  With this
  enabled, constant data is accessed via offsets from a fixed register,
  when can be initialised at run-time.  This allows constant data to be
  held in ROM at an address that is unknown the programmer, and without
  requiring that relocations be retained in the executable image.

  This code was written by DJ Delorie on behalf of Renesas and it is now
  being contributed back to the community.

Cheers
  Nick

include/elf/ChangeLog
2011-10-05  DJ Delorie  <dj@redhat.com>

	* rx.h (E_FLAG_RX_PID): New.

gas/ChangeLog
2011-10-05  DJ Delorie  <dj@redhat.com>
	    Nick Clifton  <nickc@redhat.com>

	* config/rx-defs.h (rx_pid_register): New.
	(rx_gp_register): New.
	* config/rx-parse.y (rx_lex): Add support for %gpreg and %pidreg.
	(displacement): Add PID support.
	* config/tc-rx.c (rx_pid_mode): New.
	(rx_num_int_regs): New.
	(rx_pid_register): New.
	(rx_gp_register): New.
	(options): Add -mpid and -mint-register= options.
	(md_longopts): Likewise.
	(md_parse_option): Likewise.
	(md_show_usage): Likewise.
	(rx_pid_symbol): New.
	(rx_pidreg_symbol): New.
	(rx_gpreg_symbol): New.
	(md_begin): Support PID.
	(rx_validate_fix_sub): Support PID.
	(tc_gen_reloc): Support PID.
	* doc/c-rx.texi: Document PID support.

bfd/ChangeLog
2011-10-05  DJ Delorie  <dj@redhat.com>
	    Nick Clifton  <nickc@redhat.com>

	* elf32-rx.c: Add support for PID mode.
	(rx_elf_relocate_section): Add checks for unsafe PID relocations.
	Include addend in R_RX_SYM relocations.

ld/testsuite/ChangeLog
2011-10-05  Nick Clifton  <nickc@redhat.com>

	* ld-scripts/phdrs.exp: Expect to fail for the RX.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rx.pid.patch.bz2
Type: application/x-bzip2
Size: 5862 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20111005/aa60c91e/attachment.bz2>


More information about the Binutils mailing list