boringssl/util/fipstools/testdata/x86_64-LabelRewrite/in1.s
Adam Langley f64a6eeaf0 Switch to new delocate tool.
Most importantly, this version of delocate works for ppc64le. It should
also work for x86-64, but will need significant testing to make sure
that it covers all the cases that the previous delocate.go covered.

It's less stringtastic than the old code, however the parser isn't as
nice as I would have liked. I thought that the reason we put up with
AT&T syntax with Intel is so that assembly syntax could be somewhat
consistent across platforms. At least for ppc64le, that does not appear
to be the case.

Change-Id: Ic7e3c6acc3803d19f2c3ff5620c5e39703d74212
Reviewed-on: https://boringssl-review.googlesource.com/16464
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2017-05-30 18:00:16 +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