summaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-04-25 10:41:43 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-04-25 10:41:43 +0200
commit94a4e9e4f401ffe829a992820439977ead0a0ce7 (patch)
treee229673cddbc3be349805f67b4c1448ffaa3bd2c /Makeconfig
parentfe92a91f1e713ba4951bc6e6162f8803dc76b816 (diff)
downloadglibc-94a4e9e4f401ffe829a992820439977ead0a0ce7.tar.gz
Extend BIND_NOW to installed programs with --enable-bind-now
Commit 2d6ab5df3b675e96ee587ae6a8c2ce004c6b1ba9 ("Document and fix --enable-bind-now [BZ #21015]") extended BIND_NOW to all installed shared objects. This change also covers installed programs. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makeconfig b/Makeconfig
index 07007c9459..89443e9a90 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -398,6 +398,8 @@ endif
# test modules.
ifeq ($(bind-now),yes)
LDFLAGS-lib.so += -Wl,-z,now
+# Extra flags for dynamically linked non-test main programs.
+link-extra-flags += -Wl,-z,now
endif
# Command to run after every final link (executable or shared object).
@@ -426,7 +428,7 @@ ifndef +link-pie
$(link-extra-libs)
+link-pie-after-libc = $(+postctorS) $(+postinit)
define +link-pie
-$(+link-pie-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-pie-after-libc)
+$(+link-pie-before-libc) $(rtld-LDFLAGS) $(link-extra-flags) $(link-libc) $(+link-pie-after-libc)
$(call after-link,$@)
endef
define +link-pie-tests
@@ -454,7 +456,7 @@ ifndef +link-static
$(link-extra-libs-static)
+link-static-after-libc = $(+postctorT) $(+postinit)
define +link-static
-$(+link-static-before-libc) $(link-libc-static) $(+link-static-after-libc)
+$(+link-static-before-libc) $(link-extra-flags) $(link-libc-static) $(+link-static-after-libc)
$(call after-link,$@)
endef
define +link-static-tests
@@ -485,7 +487,7 @@ else # not build-pie-default
$(link-extra-libs)
+link-after-libc = $(+postctor) $(+postinit)
define +link
-$(+link-before-libc) $(rtld-LDFLAGS) $(link-libc) $(+link-after-libc)
+$(+link-before-libc) $(rtld-LDFLAGS) $(link-extra-flags) $(link-libc) $(+link-after-libc)
$(call after-link,$@)
endef
define +link-tests