mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
04bdff6a76
Use pcrel addressing instructions in linkage stubs. bfd/ * elf64-ppc.c: Comment on powerxx _notoc stub variants. (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define. (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define. (struct ppc_link_hash_table): Add powerxx_stubs. (ppc64_elf_check_relocs): Set powerxx_stubs. (build_powerxx_offset, size_powerxx_offset), (num_relocs_for_powerxx_offset), (emit_relocs_for_powerxx_offset): New functions. (plt_stub_size): Size powerxx stubs. (ppc_build_one_stub): Emit powerxx stubs. (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for powerxx stubs. ld/ * testsuite/ld-powerpc/notoc2.d, * testsuite/ld-powerpc/notoc2.s: New test. * testsuite/ld-powerpc/powerpc.exp: Run it.
14 lines
174 B
ArmAsm
14 lines
174 B
ArmAsm
.text
|
|
.weak puts
|
|
pld 12,-1(0),1
|
|
pld 12,0(0),1
|
|
paddi 12,0,-1,1
|
|
paddi 12,0,0,1
|
|
0:
|
|
paddi 3,0,hello-.,1
|
|
bl puts@notoc
|
|
nop
|
|
b 0b
|
|
.section .rodata
|
|
hello: .asciz "Hello!"
|