Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2020 19:07:30 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r367575 - head/lib/csu/tests
Message-ID:  <202011101907.0AAJ7Us9053481@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Nov 10 19:07:30 2020
New Revision: 367575
URL: https://svnweb.freebsd.org/changeset/base/367575

Log:
  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

Modified:
  head/lib/csu/tests/fini_test.c

Modified: head/lib/csu/tests/fini_test.c
==============================================================================
--- head/lib/csu/tests/fini_test.c	Tue Nov 10 19:04:54 2020	(r367574)
+++ head/lib/csu/tests/fini_test.c	Tue Nov 10 19:07:30 2020	(r367575)
@@ -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?202011101907.0AAJ7Us9053481>