Improve readelf's display of RELR relocs.
[binutils-gdb.git] / ld / testsuite / ld-x86-64 / protected-func-2b.S
blob8fa4cbf09d6e8499c3956bf79c7e7b0507a2646f
1         .text
2         .p2align 4
3         .globl  protected_func_1b
4         .type   protected_func_1b, @function
5 protected_func_1b:
6 .LFB11:
7         .cfi_startproc
8         movl    $3, %eax
9         ret
10         .cfi_endproc
11 .LFE11:
12         .size   protected_func_1b, .-protected_func_1b
13         .section        .rodata.str1.8,"aMS",@progbits,1
14         .align 8
15 .LC0:
16         .string "'protected_func_1a' in main and shared library doesn't have same address"
17         .align 8
18 .LC1:
19         .string "'protected_func_1a' doesn't return the correct value"
20         .align 8
21 .LC2:
22         .string "'protected_func_1b' in main and shared library has same address"
23         .section        .rodata.str1.1,"aMS",@progbits,1
24 .LC3:
25         .string "PASS"
26         .section        .text.startup,"ax",@progbits
27         .p2align 4
28         .globl  main
29         .type   main, @function
30 main:
31 .LFB12:
32         .cfi_startproc
33         pushq   %r12
34         .cfi_def_cfa_offset 16
35         .cfi_offset 12, -16
36         xorl    %r12d, %r12d
37         call    protected_func_1a_p
38         cmpq    protected_func_1a@GOTPCREL(%rip), %rax
39         je      .L4
40         leaq    .LC0(%rip), %rdi
41         movl    $1, %r12d
42         call    puts
43 .L4:
44         call    protected_func_1a
45         cmpl    $1, %eax
46         jne     .L13
47         call    protected_func_1b_p
48         leaq    protected_func_1b(%rip), %rdx
49         cmpq    %rax, %rdx
50         je      .L6
51         testl   %r12d, %r12d
52         jne     .L12
53         leaq    .LC3(%rip), %rdi
54         call    puts
55         movl    %r12d, %eax
56         popq    %r12
57         .cfi_remember_state
58         .cfi_def_cfa_offset 8
59         ret
60 .L13:
61         .cfi_restore_state
62         leaq    .LC1(%rip), %rdi
63         call    puts
64         call    protected_func_1b_p
65         leaq    protected_func_1b(%rip), %rdx
66         cmpq    %rax, %rdx
67         je      .L6
68 .L12:
69         movl    $1, %r12d
70         movl    %r12d, %eax
71         popq    %r12
72         .cfi_remember_state
73         .cfi_def_cfa_offset 8
74         ret
75 .L6:
76         .cfi_restore_state
77         leaq    .LC2(%rip), %rdi
78         call    puts
79         jmp     .L12
80         .cfi_endproc
81 .LFE12:
82         .size   main, .-main
83         .section        .note.GNU-stack,"",@progbits