1 ## Check that BOLT correctly recognizes pc-relative function pointer
2 ## reference with an addend.
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
7 # RUN: llvm-strip --strip-unneeded %t.o
8 # RUN: ld.lld %t.o -o %t.exe -q
9 # RUN: llvm-bolt %t.exe --relocs -o /dev/null --print-only=foo --print-disasm \
14 .type _start,@function
19 .size _start, .-_start
27 leaq foo-
1(%rip
), %rax
28 ## Check that the instruction references foo with a negative addend,
29 ## not the previous function with a positive addend (_start+X).
31 # CHECK: leaq foo-1(%rip), %rax