svn commit: r368544 - stable/12/lib/csu/tests

John Baldwin <[email protected]> Fri, 11 Dec 2020 01:04:36 +0000 (UTC)
Newsgroups gmane.os.freebsd.devel.cvs
Message-ID <202012110104.0BB14aA2003555__11126.5995584958$1607648684$gmane$org@repo.freebsd.org>
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");
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"