boringssl/util/fipstools/delocate/testdata/x86_64-LabelRewrite/in1.s
David Benjamin 5baee45652 Use Go modules with delocate.
This makes running go test, etc., in util/fipstools/delocate work! This
adds a go_executable command to CMake like:

  go_executable(delocate boringssl.googlesource.com/boringssl/util/fipstools/delocate)

which internally gets dependencies and whatnot so it behaves like usual
Go.

Update-Note: delocate has been rearranged a bit.
Change-Id: I244a7317dd8d4f2ab77a0daa624ed3e0b385faef
Reviewed-on: https://boringssl-review.googlesource.com/31885
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-09-17 22:19:52 +00:00

44 lines
762 B
ArmAsm

.type foo, @function
.globl foo
foo:
movq $0, %rax
ret
bar:
# References to globals must be rewritten to their local targets.
call foo
jmp foo
jbe foo
jne foo
# Jumps to PLT symbols are rewritten through redirectors.
call memcpy@PLT
jmp memcpy@PLT
jbe memcpy@PLT
# Jumps to local PLT symbols use their local targets.
call foo@PLT
jmp foo@PLT
jbe foo@PLT
# Synthesized symbols are treated as local ones.
call OPENSSL_ia32cap_get@PLT
# References to local labels are left as-is in the first file.
.Llocal_label:
jbe .Llocal_label
leaq .Llocal_label+2048(%rip), %r14
leaq .Llocal_label+2048+1024(%rip), %r14
.section .rodata
.L1:
.quad 42
.L2:
.quad .L2-.L1
# Local labels and their jumps are left alone.
.text
jmp 1f
1:
jmp 1b