binutils-gdb/ld/testsuite/ld-arc/relax-local-pic.d
Claudiu Zissulescu ef551643dc [ARC] Add linker relaxation.
Add linker relaxation. The first relaxation added is converting
GOTPC32 to PCREL relocations. This relaxation doesn't change the size of
the binary.

bfd/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* elf32-arc.c (bfd_get_32_me): New function.
	(bfd_put_32_me): Likewise.
	(arc_elf_relax_section): Likewise.
	(bfd_elf32_bfd_relax_section): Define.

ld/testsuite/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* ld-arc/relax-local-pic.d: New test.
	* ld-arc/relax-local-pic.s: New file.
2019-07-24 16:33:29 +03:00

15 lines
295 B
Makefile

#source: relax-local-pic.s
#as:
#ld: -q -A elf32-arclittle -relax
#objdump: -dr
[^:]+: file format elf32-.*arc
Disassembly of section \.text:
00000100 <__start>:
100: 2700 7f84 0000 [0-9a-f]+ add r4,pcl,0x[0-9a-f]+.*
104: R_ARC_PC32 a_in_other_thread
108: 1c00 [0-9a-f\s]+ st\s+.*