svn commit: r368544 - stable/12/lib/csu/tests
John Baldwin
jhb at FreeBSD.org
Fri Dec 11 01:04:37 UTC 2020
Author: jhb
Date: Fri Dec 11 01:04:36 2020
New Revision: 368544
URL: https://svnweb.freebsd.org/changeset/base/368544
Log:
MFC 367575: Fix dso_handle_check for PIE executables.
PIE executables use crtbeginS.o and have a non-NULL dso_handle as a
result.
Modified:
stable/12/lib/csu/tests/fini_test.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/lib/csu/tests/fini_test.c
==============================================================================
--- stable/12/lib/csu/tests/fini_test.c Fri Dec 11 01:00:07 2020 (r368543)
+++ stable/12/lib/csu/tests/fini_test.c Fri Dec 11 01:04:36 2020 (r368544)
@@ -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");
More information about the svn-src-all
mailing list