This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and binutils branch master updated. a82bef932ec11cc16f205427f8a056c3c0ea517d


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  a82bef932ec11cc16f205427f8a056c3c0ea517d (commit)
      from  033c337911594898b44678fa10b47ee19dd234b5 (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=a82bef932ec11cc16f205427f8a056c3c0ea517d

commit a82bef932ec11cc16f205427f8a056c3c0ea517d
Author: Sriraman Tallam <tmsriram@google.com>
Date:   Tue May 13 10:51:48 2014 -0700

    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.
    
    	gold/
    	* symtab.h (may_need_copy_reloc): Remove check for position independent
    	code.
    	* x86_64.cc (Target_x86_64<size>::Scan::global): Add check for no
    	position independence before pc absolute may_need_copy_reloc call.
    	Add check for executable output befor pc relative may_need_copy_reloc
    	call.
    	* i386.cc: Ditto.
    	* arm.cc: Ditto.
    	* sparc.cc: Ditto.
    	* tilegx.cc: Ditto.
    	* powerpc.cc: Add check for no position independence before
    	may_need_copy_reloc calls.
    	* testsuite/pie_copyrelocs_test.cc: New file.
    	* testsuite/pie_copyrelocs_shared_test.cc: New file.
    	* Makefile.am (pie_copyrelocs_test): New test.
    	* Makefile.in: Regenerate.

-----------------------------------------------------------------------

Summary of changes:
 gold/ChangeLog             |   19 +++++++++++++++++++
 gold/arm.cc                |    6 ++++--
 gold/i386.cc               |    6 ++++--
 gold/powerpc.cc            |    6 ++++--
 gold/sparc.cc              |    6 ++++--
 gold/symtab.h              |    3 +--
 gold/testsuite/Makefile.am |   10 ++++++++++
 gold/testsuite/Makefile.in |   42 ++++++++++++++++++++++++++++++++----------
 gold/tilegx.cc             |    6 ++++--
 gold/x86_64.cc             |    6 ++++--
 10 files changed, 86 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
gdb and binutils


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]