Bug 16259 - ld testsuite uses the wrong crtend for -pie
Summary: ld testsuite uses the wrong crtend for -pie
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.25
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-26 18:52 UTC by H.J. Lu
Modified: 2013-11-26 19:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2013-11-26 18:52:52 UTC
configure.host has

*-*-linux*)
  HOSTING_CRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[       ][      ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
  HOSTING_SCRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[      ][      ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=Scrt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbeginS.o ]; then echo ../gcc/crtbeginS.o; else ${CC} --print-file-name=crtbeginS.o; fi`'
  HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
  ;;  

But it fails to handle crtendS.o.
Comment 1 Sourceware Commits 2013-11-26 19:22:44 UTC
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  b27caf75c311991772b316fe7c0eecfd5788eeaf (commit)
      from  d24a9f159c4b62ea5a64f619bd2090bbc98d8abd (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=b27caf75c311991772b316fe7c0eecfd5788eeaf

commit b27caf75c311991772b316fe7c0eecfd5788eeaf
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Nov 26 11:17:08 2013 -0800

    Add HOSTING_SLIBS and use it for -pie
    
    ld/
    
    	PR ld/16259
    	* Makefile.am (HOSTING_SLIBS): New.
    	* configure.host (HOSTING_SLIBS): New.  Used for PIE.
    	* configure.in (HOSTING_SLIBS): New AC_SUBST.
    	* Makefile.in: Regenerated.
    	* configure: Likewise.
    
    ld/testsuite/
    
    	PR ld/16259
    	* config/default.exp (get_target_emul): Also set HOSTING_SLIBS.
    	* lib/ld-lib.exp (default_ld_link): Use HOSTING_SLIBS for -pie.

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

Summary of changes:
 ld/ChangeLog                    |    9 +++++++++
 ld/Makefile.am                  |    1 +
 ld/Makefile.in                  |    1 +
 ld/configure                    |    6 ++++--
 ld/configure.host               |    7 +++++++
 ld/configure.in                 |    1 +
 ld/testsuite/ChangeLog          |    6 ++++++
 ld/testsuite/config/default.exp |    4 ++--
 ld/testsuite/lib/ld-lib.exp     |    4 +++-
 9 files changed, 34 insertions(+), 5 deletions(-)