[ARC] Fix/improve small data support.

The R_ARC_SDA32 is wrongly described as a ME relocation, fix it.  Offset the
__SDATA_BEGIN__ to take advantage of the signed 9-bit field of the
load/store instructions.

include/
2016-07-08  Claudiu Zissulescu  <claziss@synopsys.com>

	* elf/arc-reloc.def (ARC_SDA32): Don't use ME transformation.

ld/
2016-07-08  Claudiu Zissulescu  <claziss@synopsys.com>

	* emulparams/arcelf.sh (SDATA_START_SYMBOLS): Add offset.
	* testsuite/ld-arc/sda-relocs.dd: New file.
	* testsuite/ld-arc/sda-relocs.ld: Likewise.
	* testsuite/ld-arc/sda-relocs.rd: Likewise.
	* testsuite/ld-arc/sda-relocs.s: Likewise.
	* testsuite/ld-arc/arc.exp: Add SDA tests.
This commit is contained in:
Claudiu Zissulescu
2016-07-08 11:55:49 +02:00
parent efc67f64c9
commit fa1c017017
9 changed files with 113 additions and 2 deletions

View File

@ -139,7 +139,7 @@ ARC_RELOC_HOWTO(ARC_SDA32, 18, \
32, \
replace_word32, \
signed, \
( ME ( ( ( S + A ) - _SDA_BASE_ ) ) ))
( ( ( S + A ) - _SDA_BASE_ ) ))
ARC_RELOC_HOWTO(ARC_SDA_LDST, 19, \
2, \