summaryrefslogtreecommitdiff
path: root/regress/libexec
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-08-16 19:58:12 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-08-16 19:58:12 +0000
commitb6e7694448cc7123c45b85c7667ed5af21f789a0 (patch)
tree6ad1a98d7c84977350412f129c33a4cdfa664372 /regress/libexec
parent02f3d3fd098463e86bd33aa9b802bc391e0884d4 (diff)
Add regression test to check that PIEs work too.
Diffstat (limited to 'regress/libexec')
-rw-r--r--regress/libexec/ld.so/randomdata/Makefile4
-rw-r--r--regress/libexec/ld.so/randomdata/prog-pie/Makefile10
2 files changed, 12 insertions, 2 deletions
diff --git a/regress/libexec/ld.so/randomdata/Makefile b/regress/libexec/ld.so/randomdata/Makefile
index 96fde384ee2..126c5ba4fcc 100644
--- a/regress/libexec/ld.so/randomdata/Makefile
+++ b/regress/libexec/ld.so/randomdata/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.2 2012/08/16 18:19:36 matthew Exp $
+# $OpenBSD: Makefile,v 1.3 2012/08/16 19:58:11 matthew Exp $
-SUBDIR+= libaa prog-dynamic prog-static ld.so-cookie
+SUBDIR+= libaa prog-dynamic prog-static prog-pie ld.so-cookie
.include <bsd.subdir.mk>
diff --git a/regress/libexec/ld.so/randomdata/prog-pie/Makefile b/regress/libexec/ld.so/randomdata/prog-pie/Makefile
new file mode 100644
index 00000000000..f14a8c70e3a
--- /dev/null
+++ b/regress/libexec/ld.so/randomdata/prog-pie/Makefile
@@ -0,0 +1,10 @@
+# $OpenBSD: Makefile,v 1.1 2012/08/16 19:58:11 matthew Exp $
+
+PROG= prog
+CFLAGS+= -fPIE
+LDFLAGS+= -pie
+LDADD+= -Wl,-rpath,$(LIBAADIR) -L$(LIBAADIR) -laa
+DPADD+= $(LIBAA)
+.PATH: $(.CURDIR)/../prog
+
+.include <bsd.regress.mk>