From 9ebe945bd791f25fe5f4774205cbf07eabca348b Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 10 Nov 2020 19:09:35 +0000 Subject: [PATCH] Add C startup code tests for PIE binaries. - Force dynamic to be a non-PIE binary. - Add a dynamicpie test which uses a PIE binary. Reviewed by: andrew Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27127 --- lib/csu/tests/Makefile | 1 + lib/csu/tests/dynamic/Makefile | 3 +++ lib/csu/tests/dynamicpie/Makefile | 9 +++++++++ 3 files changed, 13 insertions(+) create mode 100644 lib/csu/tests/dynamicpie/Makefile diff --git a/lib/csu/tests/Makefile b/lib/csu/tests/Makefile index a1d4cee4003..3533fd39650 100644 --- a/lib/csu/tests/Makefile +++ b/lib/csu/tests/Makefile @@ -3,6 +3,7 @@ SUBDIR= dso TESTS_SUBDIRS= dynamic TESTS_SUBDIRS+= dynamiclib +TESTS_SUBDIRS+= dynamicpie TESTS_SUBDIRS+= static SUBDIR_DEPEND_dynamiclib=dso diff --git a/lib/csu/tests/dynamic/Makefile b/lib/csu/tests/dynamic/Makefile index 190962f9c3c..266f5c5a7d0 100644 --- a/lib/csu/tests/dynamic/Makefile +++ b/lib/csu/tests/dynamic/Makefile @@ -2,5 +2,8 @@ .PATH: ${.CURDIR:H} +.include +MK_PIE= no + .include "../Makefile.tests" .include diff --git a/lib/csu/tests/dynamicpie/Makefile b/lib/csu/tests/dynamicpie/Makefile new file mode 100644 index 00000000000..98659a4cc26 --- /dev/null +++ b/lib/csu/tests/dynamicpie/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR:H} + +.include +MK_PIE= yes + +.include "../Makefile.tests" +.include