diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-11-10 19:07:30 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2020-11-10 19:07:30 +0000 |
commit | f9fd7337f63698f33239c58c07bf430198235a22 (patch) | |
tree | cf2fbf3cbb3eb93f20d7bf3e467bfda73cc025bb /lib/csu | |
parent | ecad1d050ce550cff0a4726190b8374dcdbaa25b (diff) | |
download | src-f9fd7337f63698f33239c58c07bf430198235a22.tar.gz src-f9fd7337f63698f33239c58c07bf430198235a22.zip |
Fix dso_handle_check for PIE executables.
PIE executables use crtbeginS.o and have a non-NULL dso_handle as a
result.
Reviewed by: andrew, emaste
MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27126
Notes
Notes:
svn path=/head/; revision=367575
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/tests/fini_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/csu/tests/fini_test.c b/lib/csu/tests/fini_test.c index ea825e51acf9..c06e62e093f8 100644 --- a/lib/csu/tests/fini_test.c +++ b/lib/csu/tests/fini_test.c @@ -141,9 +141,9 @@ dso_handle_check(void) { void *dso = __dso_handle; -#ifdef DSO_LIB +#if defined(DSO_LIB) || defined(__PIE__) ATF_REQUIRE_MSG(dso != NULL, - "Null __dso_handle in DSO"); + "Null __dso_handle in DSO/PIE"); #else ATF_REQUIRE_MSG(dso == NULL, "Invalid __dso_handle in non-DSO"); |