summaryrefslogtreecommitdiff
path: root/bootstrap/mods
diff options
context:
space:
mode:
authortv <tv>2005-01-18 19:36:25 +0000
committertv <tv>2005-01-18 19:36:25 +0000
commit99c4c63ab8da36962e963593708807d17e5b097f (patch)
tree030e4f0d9c373328de0c68a856e5c6a34b05da91 /bootstrap/mods
parent7bce94a93f30056a1711f3b85697f1288cc2832c (diff)
downloadpkgsrc-99c4c63ab8da36962e963593708807d17e5b097f.tar.gz
Add random image-base address hack adapted from libtool.
Diffstat (limited to 'bootstrap/mods')
-rw-r--r--bootstrap/mods/mk/Interix.bsd.lib.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/bootstrap/mods/mk/Interix.bsd.lib.mk b/bootstrap/mods/mk/Interix.bsd.lib.mk
index 3b19b49280b..77c1c71e8f6 100644
--- a/bootstrap/mods/mk/Interix.bsd.lib.mk
+++ b/bootstrap/mods/mk/Interix.bsd.lib.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Interix.bsd.lib.mk,v 1.1 2005/01/18 17:49:26 tv Exp $
+# $NetBSD: Interix.bsd.lib.mk,v 1.2 2005/01/18 19:36:25 tv Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.if !target(__initialized__)
@@ -332,6 +332,7 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \
@rm -f lib${LIB}.so.${SHLIB_FULLVERSION}
$(CC) -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
${SHLIB_LDSTARTFILE} \
+ -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280)) \
-Wl,--whole-archive ${SOLIB} -Wl,--no-whole-archive ${LDADD} \
${SHLIB_LDENDFILE}
.if ${OBJECT_FMT} == "ELF"