+2015-06-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/gnu-user.h (GNU_USER_TARGET_ENDFILE_SPEC): Use
+ PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined.
+
2015-06-29 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*jcc_1): Use %! in asm template.
object constructed before entering `main', followed by a normal
GNU userspace "finalizer" file, `crtn.o'. */
+#if defined HAVE_LD_PIE
+#define GNU_USER_TARGET_ENDFILE_SPEC \
+ "%{fvtable-verify=none:%s; \
+ fvtable-verify=preinit:vtv_end_preinit.o%s; \
+ fvtable-verify=std:vtv_end.o%s} \
+ %{shared:crtendS.o%s;: %{" PIE_SPEC ":crtendS.o%s} \
+ %{" NO_PIE_SPEC ":crtend.o%s}} crtn.o%s"
+#else
#define GNU_USER_TARGET_ENDFILE_SPEC \
"%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \
fvtable-verify=std:vtv_end.o%s} \
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+#endif
#undef ENDFILE_SPEC
#define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC