mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
5627d875bc
According to "ELF for the ARM(r) 64-bit Architecture (AArch64)", this relocation can be used "to prevent removal of sections that might otherwise appear to be unused." gold/ * aarch64-reloc.def (NONE): New relocation. * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE. (Target_aarch64::Scan::global): Likewise. * testsuite/Makefile.am (aarch64_reloc_none): New test. * testsuite/Makefile.in: Regenerate. * testsuite/aarch64_reloc_none.s: New test source file. * testsuite/aarch64_reloc_none.sh: New test script.
17 lines
188 B
ArmAsm
17 lines
188 B
ArmAsm
.text
|
|
.global _start
|
|
.type _start, %function
|
|
_start:
|
|
nop
|
|
.reloc 0, R_AARCH64_NONE, foo
|
|
|
|
.section .foo,"ax"
|
|
.global foo
|
|
foo:
|
|
nop
|
|
|
|
.section .bar,"ax"
|
|
.global bar
|
|
bar:
|
|
nop
|