mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
3a4f096e5f
Please see patch discussion: https://www.sourceware.org/ml/binutils/2016-05/msg00322.html 2016-06-28 Sriraman Tallam <tmsriram@google.com> * x86_64.cc (Lazy_view): New class. (can_convert_mov_to_lea): Templatize function. Make the function check for appropriate relocation types and use the view parameter to get section contents. (can_convert_callq_to_direct): New function. (Target_x86_64<size>::Scan::global): Refactor. (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect call via GOT that can be converted. * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test. * testsuite/Makefile.in: Regenerate. * testsuite/x86_64_indirect_call_to_direct1.s: New file. * testsuite/x86_64_indirect_jump_to_direct1.s: New file.
12 lines
156 B
ArmAsm
12 lines
156 B
ArmAsm
.text
|
|
.globl foo
|
|
.type foo, @function
|
|
foo:
|
|
ret
|
|
.size foo, .-foo
|
|
.globl main
|
|
.type main, @function
|
|
main:
|
|
jmp *foo@GOTPCREL(%rip)
|
|
.size main, .-main
|