Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2020 01:04:36 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r368544 - stable/12/lib/csu/tests
Message-ID:  <202012110104.0BB14aA2003555@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012110104.0BB14aA2003555>