diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-01-19 19:36:30 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-01-19 19:36:30 +0000 |
commit | 49cc20aa5c416ea4307931cccf6353247368187d (patch) | |
tree | 8c37ce163d141e92f07211742d8b4b96a91170cd /ld/testsuite | |
parent | d64e6f4aad67d6ab2c2f3a08a405108c521e38ec (diff) | |
download | binutils-redhat-49cc20aa5c416ea4307931cccf6353247368187d.tar.gz |
Add HOSTING_SCRT0 for PIE test
ld/
* Makefile.am (HOSTING_SCRT0): New.
* configure.host (HOSTING_SCRT0): New. Used for PIE.
* configure.in (HOSTING_SCRT0): New AC_SUBST.
* Makefile.in: Regenerated.
* configure: Likewise.
ld/testsuite/
* config/default.exp (get_target_emul): Also set HOSTING_SCRT0.
* lib/ld-lib.exp (default_ld_link): Use HOSTING_SCRT0 for -pie.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/config/default.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 7 |
3 files changed, 14 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 70aa059357..ee98aaa776 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-01-19 H.J. Lu <hongjiu.lu@intel.com> + + * config/default.exp (get_target_emul): Also set HOSTING_SCRT0. + + * lib/ld-lib.exp (default_ld_link): Use HOSTING_SCRT0 for -pie. + 2013-01-18 H.J. Lu <hongjiu.lu@intel.com> * ld-size/size-10.rd: Updated. diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp index bba48d7416..d540f1992a 100644 --- a/ld/testsuite/config/default.exp +++ b/ld/testsuite/config/default.exp @@ -139,11 +139,11 @@ proc get_target_emul {} { } if [isnative] { - foreach x {HOSTING_CRT0 HOSTING_LIBS} { + foreach x {HOSTING_CRT0 HOSTING_SCRT0 HOSTING_LIBS} { get_link_files $x } } else { - foreach x {HOSTING_CRT0 HOSTING_LIBS} { set $x "" } + foreach x {HOSTING_CRT0 HOSTING_SCRT0 HOSTING_LIBS} { set $x "" } } if ![info exists HOSTING_EMU] { set HOSTING_EMU "-m [get_target_emul]" } diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index a3ff2e32e2..0b156a1048 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -179,13 +179,18 @@ proc big_or_little_endian {} { proc default_ld_link { ld target objects } { global HOSTING_EMU global HOSTING_CRT0 + global HOSTING_SCRT0 global HOSTING_LIBS global LIBS global host_triplet global link_output global exec_output - set objs "$HOSTING_CRT0 $objects" + if { [ string match "* -pie *" $objects ] } { + set objs "$HOSTING_SCRT0 $objects" + } else { + set objs "$HOSTING_CRT0 $objects" + } set libs "$LIBS $HOSTING_LIBS" if [is_endian_output_format $objects] then { |