blob: 8ee708967b3d6262d5b41191ddbef8611c88a83a [file] [log] [blame]
Robert Sloan8ff03552017-06-14 12:40:58 -07001 .type foo, @function
2 .globl foo
3foo:
4 movq $0, %rax
5 ret
6
7bar:
8 # References to globals must be rewritten to their local targets.
9 call foo
10 jmp foo
11 jbe foo
12 jne foo
13
14 # Jumps to PLT symbols are rewritten through redirectors.
15 call memcpy@PLT
16 jmp memcpy@PLT
17 jbe memcpy@PLT
18
19 # Jumps to local PLT symbols use their local targets.
20 call foo@PLT
21 jmp foo@PLT
22 jbe foo@PLT
23
24 # Synthesized symbols are treated as local ones.
25 call OPENSSL_ia32cap_get@PLT
26
27 # References to local labels are left as-is in the first file.
28.Llocal_label:
29 jbe .Llocal_label
30 leaq .Llocal_label+2048(%rip), %r14
31 leaq .Llocal_label+2048+1024(%rip), %r14
32
33 .section .rodata
34.L1:
35 .quad 42
36.L2:
37 .quad .L2-.L1
Pete Bentley0c61efe2019-08-13 09:32:23 +010038 .uleb128 .L2-.L1
39 .sleb128 .L2-.L1
Robert Sloan8ff03552017-06-14 12:40:58 -070040
41 # Local labels and their jumps are left alone.
42 .text
43 jmp 1f
441:
45 jmp 1b