binutils-gdb/ld/testsuite/ld-arc/relax-local-pic.s
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

17 lines
404 B
ArmAsm

.section .text
.align 4
.global __start
.type __start, @function
__start:
ld r4,[pcl,@a_in_other_thread@gotpc]
st 1,[r4]
.size __start, .-__start
.global a_in_other_thread
.section .data
.align 4
.type a_in_other_thread, @object
.size a_in_other_thread, 4
a_in_other_thread:
.word -559038737