binutils-gdb/ld/testsuite/ld-powerpc/symtocbase-2.s
Alan Modra ef5684c2bd Update PowerPC64 symtocbase test
Using a symbol other than .TOC. with @tocbase is an extension to the
ABI.  It is never valid to use a symbol without a definition in the
binary, and symbols on these expressions cannot be overridden.  Make
this explicit by using ".hidden" in the testcase.

	* testsuite/ld-powerpc/symtocbase-1.s: Align data.  Make function
	entry symbol hidden.
	* testsuite/ld-powerpc/symtocbase-2.s: Likewise.
	* testsuite/ld-powerpc/symtocbase.d: Adjust expected output.
2022-01-28 17:00:55 +10:30

21 lines
253 B
ArmAsm

.section .toc,"aw",@progbits
.align 15
.globl y
y: .quad .y,.y@tocbase,0
.LCi: .quad i
.space 48 * 1024
.data
.p2align 3
.L2bases:
.quad .TOC.@tocbase
.quad .x@tocbase
.quad .y@tocbase
.text
.globl .y
.hidden .y
.y:
ld 9,.LCi@toc(2)
blr