about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makeconfig2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4505dcef1d..f11f6e11c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* Makeconfig (+link-pie-before-libc): Add CRT-* hook to override
+	the startup object.
+
 2017-08-17  Florian Weimer  <fweimer@redhat.com>
 
 	* include/sys/socket.h (__opensock): Remove internal_function.
diff --git a/Makeconfig b/Makeconfig
index 5f2469116c..b51904b797 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -409,7 +409,7 @@ ifndef +link-pie
 +link-pie-before-libc = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \
 	     $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
 	     $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
-	     $(addprefix $(csu-objpfx),S$(start-installed-name)) \
+	     $(firstword $(CRT-$(@F)) $(csu-objpfx)S$(start-installed-name)) \
 	     $(+preinit) $(+prectorS) \
 	     $(filter-out $(addprefix $(csu-objpfx),start.o \
 						    S$(start-installed-name))\