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.
This commit is contained in:
H.J. Lu
2013-01-19 19:36:37 +00:00
parent 44fc9657c5
commit 6738cadcc7
9 changed files with 39 additions and 5 deletions

View File

@@ -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 {