This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB 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. fdb09caf2386b09272df3cac6ec65be724ace3b9


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  fdb09caf2386b09272df3cac6ec65be724ace3b9 (commit)
      from  538baf8b7e6d17a490f126f8565638469da70204 (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=fdb09caf2386b09272df3cac6ec65be724ace3b9

commit fdb09caf2386b09272df3cac6ec65be724ace3b9
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Date:   Tue Dec 2 16:35:47 2014 +0100

    execl-update-breakpoints.exp: Move whole segment instead of .text section
    
    The test case builds two copies of the program, one with the compile
    option "ldflags=-Wl,-Ttext=0x1000000" and the other with the address
    changed to 0x2000000.  However, when linking with ld.bfd, the
    resulting executables crash early in ld.so on S390 and i386.
    
    Analysis of the crash: The default linker script establishes a certain
    order of loadable sections, and the option "-Ttext" effectively splits
    these into an "unaffected" lot (everything before .text) and an
    "affected" lot.  The affected lot is placed at the given address,
    whereas the unaffected lot stays at its default address.  The
    unaffected lot starts at an aligned address plus Elf header sizes,
    which is good if it is the first LOAD segment (like on AMD64).  But if
    the affected lot comes first instead (like on S390 and i386), the PHDR
    doesn't fit there and is placed *outside* any LOAD segments.  Then the
    PHDR is not mapped when the loader gets control, and the loader runs
    into a segmentation fault while trying to access it.
    
    Since we are lucky about the order of segments on AMD64, the test
    succeeds there, but the resulting binaries are unusually large -- 2.1M
    each, with lots of padding within.
    
    When replacing '-Ttext' by '-Ttext-segment', the linker moves all
    segments consistently, the binaries have normal sizes, and the test
    case succeeds on all mentioned platforms.
    
    Since old versions of the gold linker don't support '-Ttext-segment',
    the patch also adds logic for falling back to '-Ttext'.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/execl-update-breakpoints.exp: Specify the link address
    	with '-Ttext-segment' instead of '-Ttext'.  Fall back to '-Ttext'
    	if the linker doesn't understand this.

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

Summary of changes:
 gdb/testsuite/ChangeLog                            |    6 ++++
 .../gdb.base/execl-update-breakpoints.exp          |   30 ++++++++++++++-----
 2 files changed, 28 insertions(+), 8 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]