Remove address check if HIDDEN_UNDEF_TEST is defined
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 25 Oct 2012 03:59:37 +0000 (03:59 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 25 Oct 2012 03:59:37 +0000 (03:59 +0000)
* 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.

ld/testsuite/ChangeLog
ld/testsuite/ld-elfvsb/main.c

index 0f99f97594c3206dfd37e164446ca326a7cb3292..2ed8cb759b141806455184ace0e993961772e22b 100644 (file)
@@ -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
index b498d43459ea21c45917a8de0b0ffedb8ce6006f..5419826f5071d3772945010bc4735e736f57da98 100644 (file)
@@ -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