diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-01-19 19:36:37 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-01-19 19:36:37 +0000 |
commit | 6738cadcc7b0e5ada20372765a72771dd99efe43 (patch) | |
tree | e505794ada35899f1579a6c0498ff2bd97bfa0b0 /ld/testsuite/lib | |
parent | 44fc9657c5168eb2e6c116eef7cc709972fcdc0f (diff) | |
download | gdb-6738cadcc7b0e5ada20372765a72771dd99efe43.zip gdb-6738cadcc7b0e5ada20372765a72771dd99efe43.tar.gz gdb-6738cadcc7b0e5ada20372765a72771dd99efe43.tar.bz2 |
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/lib')
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index a3ff2e3..0b156a1 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 { |