aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 7e955b657d..1018b43b3e 100644
--- a/Makerules
+++ b/Makerules
@@ -585,6 +585,10 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
LDLIBS-c.so += $(gnulib)
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_main
+# If lazy relocation is disabled add the -z now flag.
+ifeq ($(bind-now),yes)
+LDFLAGS-c.so += -Wl,-z,now
+endif
# Pre-link the objects of libc_pic.a so that we can locally resolve
# COMMON symbols before we link against ld.so. This is because ld.so
# contains some of libc_pic.a already, which will prevent the COMMONs