From 3a4f096e5ff41e2a3b832cf6c815ad1f28437c63 Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Tue, 28 Jun 2016 15:42:33 -0700 Subject: Convert indirect calls to direct when possible. Please see patch discussion: https://www.sourceware.org/ml/binutils/2016-05/msg00322.html 2016-06-28 Sriraman Tallam * 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::Scan::global): Refactor. (Target_x86_64::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. --- gold/ChangeLog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gold/ChangeLog') diff --git a/gold/ChangeLog b/gold/ChangeLog index d6bae2b..8b293cd 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,18 @@ +2016-06-28 Sriraman Tallam + + * 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::Scan::global): Refactor. + (Target_x86_64::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. + 2016-06-28 Igor Kudrin * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section -- cgit v1.1