Commit ff97dd82 by Alan Modra Committed by Alan Modra

[RS6000] linux startfile/endfile

These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

	PR target/81170
	PR target/81295
	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
	match gnu-user.h startfile.
	(ENDFILE_LINUX_SPEC): Similarly.

From-SVN: r251065
parent 9567c62e
2017-08-12 Alan Modra <amodra@gmail.com>
PR target/81170
PR target/81295
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
match gnu-user.h startfile.
(ENDFILE_LINUX_SPEC): Similarly.
2017-08-11 Thomas Schwinge <thomas@codesourcery.com> 2017-08-11 Thomas Schwinge <thomas@codesourcery.com>
PR lto/81430 PR lto/81430
......
...@@ -757,24 +757,34 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) ...@@ -757,24 +757,34 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
#define CRTOFFLOADEND "" #define CRTOFFLOADEND ""
#endif #endif
#ifdef HAVE_LD_PIE /* STARTFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_STARTFILE_SPEC
#define STARTFILE_LINUX_SPEC "\ but with the mnewlib ecrti.o%s selection substituted for crti.o%s. */
%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ #define STARTFILE_LINUX_SPEC \
%{mnewlib:ecrti.o%s;:crti.o%s} \ "%{shared:; \
%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ pg|p|profile:gcrt1.o%s; \
" CRTOFFLOADBEGIN static:crt1.o%s; \
#else " PIE_SPEC ":Scrt1.o%s; \
#define STARTFILE_LINUX_SPEC "\ :crt1.o%s} \
%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ %{mnewlib:ecrti.o%s;:crti.o%s} \
%{mnewlib:ecrti.o%s;:crti.o%s} \ %{static:crtbeginT.o%s; \
%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ shared|" PIE_SPEC ":crtbeginS.o%s; \
" CRTOFFLOADBEGIN :crtbegin.o%s} \
#endif %{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_start_preinit.o%s; \
#define ENDFILE_LINUX_SPEC "\ fvtable-verify=std:vtv_start.o%s} \
%{shared|pie:crtendS.o%s;:crtend.o%s} \ " CRTOFFLOADBEGIN
%{mnewlib:ecrtn.o%s;:crtn.o%s} \
" CRTOFFLOADEND /* ENDFILE_LINUX_SPEC should be the same as GNU_USER_TARGET_ENDFILE_SPEC
but with the mnewlib ecrtn.o%s selection substituted for crtn.o%s. */
#define ENDFILE_LINUX_SPEC \
"%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \
fvtable-verify=std:vtv_end.o%s} \
%{static:crtend.o%s; \
shared|" PIE_SPEC ":crtendS.o%s; \
:crtend.o%s} \
%{mnewlib:ecrtn.o%s;:crtn.o%s} \
" CRTOFFLOADEND
#define LINK_START_LINUX_SPEC "" #define LINK_START_LINUX_SPEC ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment