summaryrefslogtreecommitdiff
path: root/libexec/ld.so/Makefile
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-08-27 22:14:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-08-27 22:14:13 +0000
commit5007ca9e793fbd31a04ee6f508e4c7681235536a (patch)
treee867c4cd32813749b219f6d2dc61f87ce4060e55 /libexec/ld.so/Makefile
parenta85b484055165491129a13a83fff2220e7bed685 (diff)
Link the ~45 .o which become ld.so in a random order.
ok kettenis visa
Diffstat (limited to 'libexec/ld.so/Makefile')
-rw-r--r--libexec/ld.so/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.so/Makefile b/libexec/ld.so/Makefile
index dcb295fc02e..d087d59780b 100644
--- a/libexec/ld.so/Makefile
+++ b/libexec/ld.so/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.66 2017/08/27 22:04:47 deraadt Exp $
+# $OpenBSD: Makefile,v 1.67 2017/08/27 22:14:12 deraadt Exp $
SUBDIR=ldconfig ldd
MAN= ld.so.1
@@ -62,8 +62,9 @@ $(test_prog):
printf '#include <stdio.h>\nint main(int argc, char **argv){ printf("%%s: ", argv[0]); printf("%%s!\\n", argv[1] ? argv[1] : "foo"); }\n' | \
$(CC) -x c - -Wl,-dynamic-linker,${.OBJDIR}/$(candidate) -o $@
-$(PROG): $(test_prog) ${VERSION_SCRIPT}
- $(LD) ${DEBUG} -x -e _dl_start $(ELF_LDFLAGS) -o $(candidate) $(OBJS)
+$(PROG): $(test_prog) ${VERSION_SCRIPT} $(OBJS)
+ $(LD) ${DEBUG} -x -e _dl_start $(ELF_LDFLAGS) -o $(candidate) \
+ `echo ${OBJS} | tr " " "\n" | sort -R`
.ifndef CROSSDIR
ulimit -c 0; [ "`${.OBJDIR}/$(test_prog) ok`" = "${.OBJDIR}/$(test_prog): ok!" ]
.endif