45965137be
This adds support for "func@localentry", an expression that returns the ELFv2 local entry point address of function "func". I've excluded dynamic relocation support because that obviously would require glibc changes. include/elf/ * ppc64.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define. bfd/ * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry. (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL. (ppc64_elf_check_relocs): Likewise. (ppc64_elf_relocate_section): Likewise. * Add BFD_RELOC_PPC64_ADDR64_LOCAL. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. gas/ * config/tc-ppc.c (ppc_elf_suffix): Support @localentry. (md_apply_fix): Support R_PPC64_ADDR64_LOCAL. ld/testsuite/ * ld-powerpc/elfv2-2a.s, ld-powerpc/elfv2-2b.s: New files. * ld-powerpc/elfv2-2exe.d, ld-powerpc/elfv2-2so.d: New files. * ld-powerpc/powerpc.exp: Run new test. elfcpp/ * powerpc.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define. gold/ * powerpc.cc (Target_powerpc::Scan::local, global): Support R_PPC64_ADDR64_LOCAL. (Target_powerpc::Relocate::relocate): Likewise.
27 lines
357 B
ArmAsm
27 lines
357 B
ArmAsm
.globl f1
|
|
.type f1,@function
|
|
.text
|
|
f1:
|
|
addis 2,12,.TOC.-f1@ha
|
|
addi 2,2,.TOC.-f1@l
|
|
.localentry f1,.-f1
|
|
blr
|
|
.size f1,.-f1
|
|
|
|
.globl f2
|
|
.type f2,@function
|
|
.text
|
|
f2:
|
|
addi 2,12,.TOC.-f2
|
|
.localentry f2,.-f2
|
|
blr
|
|
.size f2,.-f2
|
|
|
|
.quad f1
|
|
.quad f1@localentry
|
|
.quad f2
|
|
.quad f2@localentry
|
|
.quad f3
|
|
.quad f3@localentry
|
|
.quad f4
|
|
.quad f4@localentry
|