]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/testsuite/ld-x86-64/pr21481b.S
ELF: Add support for unique section ID to assembler
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-x86-64 / pr21481b.S
1 .section .rodata.foo,"aMS",@progbits,1,unique,1
2 .LC0:
3 .string "PASS"
4 .text
5 .globl check
6 .type check, @function
7 check:
8 subq $8, %rsp
9 call *get_func1@GOTPCREL(%rip)
10 cmpl $func1, %eax
11 jne .L3
12 movq func1_p@GOTPCREL(%rip), %rdx
13 #ifdef __LP64__
14 cmpq %rax, (%rdx)
15 #else
16 cmpl %eax, (%rdx)
17 #endif
18 jne .L3
19 call *func1@GOTPCREL(%rip)
20 cmpl $1, %eax
21 jne .L3
22 call *call_func1@GOTPCREL(%rip)
23 cmpl $1, %eax
24 jne .L3
25 leaq .LC0(%rip), %rdi
26 addq $8, %rsp
27 jmp *puts@GOTPCREL(%rip)
28 .L3:
29 call *abort@GOTPCREL(%rip)
30 .size check, .-check
31 .globl get_func1
32 .type get_func1, @function
33 get_func1:
34 movq func1@GOTPCREL(%rip), %rax
35 ret
36 .size get_func1, .-get_func1
37 .globl call_func1
38 .type call_func1, @function
39 call_func1:
40 jmp *func1@GOTPCREL(%rip)
41 .size call_func1, .-call_func1
42 .globl func1_p
43 .section .rodata.foo,"a",@progbits,unique,2
44 .align 8
45 .size func1_p, 8
46 .type func1_p, @object
47 func1_p:
48 .dc.a func1
49 .text
50 implementation1:
51 movl $1, %eax
52 ret
53 .size implementation1, .-implementation1
54 .globl func1
55 .type func1, @gnu_indirect_function
56 func1:
57 leaq implementation1(%rip), %rax
58 ret
59 .size func1, .-func1
60 .section .note.GNU-stack,"",@progbits