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
This commit is contained in:
jhb 2020-11-10 19:09:35 +00:00
parent 7673701413
commit e85e8ebb30
3 changed files with 13 additions and 0 deletions

View File

@ -3,6 +3,7 @@
SUBDIR= dso SUBDIR= dso
TESTS_SUBDIRS= dynamic TESTS_SUBDIRS= dynamic
TESTS_SUBDIRS+= dynamiclib TESTS_SUBDIRS+= dynamiclib
TESTS_SUBDIRS+= dynamicpie
TESTS_SUBDIRS+= static TESTS_SUBDIRS+= static
SUBDIR_DEPEND_dynamiclib=dso SUBDIR_DEPEND_dynamiclib=dso

View File

@ -2,5 +2,8 @@
.PATH: ${.CURDIR:H} .PATH: ${.CURDIR:H}
.include <src.opts.mk>
MK_PIE= no
.include "../Makefile.tests" .include "../Makefile.tests"
.include <bsd.test.mk> .include <bsd.test.mk>

View File

@ -0,0 +1,9 @@
# $FreeBSD$
.PATH: ${.CURDIR:H}
.include <src.opts.mk>
MK_PIE= yes
.include "../Makefile.tests"
.include <bsd.test.mk>