This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Remove address check if HIDDEN_UNDEF_TEST is defined


When HIDDEN_UNDEF_TEST is defined, address of a hidden function is
always non-zero,  I checked in this patch to remove the address check.

H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 0f99f97..2ed8cb7 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2012-10-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* ld-elfvsb/main.c (main_visibility_checkcom): Remove address
+	check for visibility_def if HIDDEN_UNDEF_TEST is defined.
+	(main_visibility_checkweak): Remove address check for
+	visibility_func if HIDDEN_UNDEF_TEST is defined.
+
 2012-10-25  Nathan Sidwell  <nathan@codesourcery.com>
 
 	* ld-scripts/empty-aligned.d: Revert last change.  Allow more
diff --git a/ld/testsuite/ld-elfvsb/main.c b/ld/testsuite/ld-elfvsb/main.c
index b498d43..5419826 100644
--- a/ld/testsuite/ld-elfvsb/main.c
+++ b/ld/testsuite/ld-elfvsb/main.c
@@ -205,13 +205,13 @@ asm (".hidden visibility_func");
 int
 main_visibility_checkcom (void)
 {
-  return & visibility_def != NULL && visibility_def == 2;
+  return visibility_def == 2;
 }
 
 int
 main_visibility_checkweak (void)
 {
-  return & visibility_func != NULL && visibility_func () == 2;
+  return visibility_func () == 2;
 }
 #else
 int


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]