This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
gdb and binutils branch master updated. 1642b4b33783d70979dca379d57a0ce02559daec
- From: tmsriram at sourceware dot org
- To: binutils-cvs at sourceware dot org
- Date: 13 May 2014 17:44:10 -0000
- Subject: gdb and binutils branch master updated. 1642b4b33783d70979dca379d57a0ce02559daec
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 1642b4b33783d70979dca379d57a0ce02559daec (commit)
from 9b44a3a57d17ea2d35823780007a38daeeaec6a4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1642b4b33783d70979dca379d57a0ce02559daec
commit 1642b4b33783d70979dca379d57a0ce02559daec
Author: Sriraman Tallam <tmsriram@google.com>
Date: Tue May 13 10:33:59 2014 -0700
Optimizing accesses to Globals with -fpie -pie:
With -pie and x86, the linker complains if it sees a PC-relative relocation
to access a global as it expects a GOTPCREL relocation. This is really not
necessary as the linker could use a copy relocation to get around it. This
patch enables copy relocations with pie.
Context:
This is useful because currently the GCC compiler with option -fpie makes
every extern global access go through the GOT. That is because the compiler
cannot tell if a global will end up being defined in the executable or not
and is conservative. This ends up hurting performance when the binary is linked
as mostly static where most of the globals do end up being defined in the
executable. By allowing copy relocs with fPIE, the compiler need not generate
a GOTPCREL(GOT access) for any global access. It can safely assume that all
globals will be defined in the executable and generate a PC-relative access
instead. Gold can then create a copy reloc for only the undefined globals.
-----------------------------------------------------------------------
Summary of changes:
gold/testsuite/pie_copyrelocs_shared_test.cc | 26 +++++++++++++++++++++
gold/testsuite/pie_copyrelocs_test.cc | 31 ++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 0 deletions(-)
create mode 100644 gold/testsuite/pie_copyrelocs_shared_test.cc
create mode 100644 gold/testsuite/pie_copyrelocs_test.cc
hooks/post-receive
--
gdb and binutils