2000-07-15 H.J. Lu (hjl@gnu.org)
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 15 Jul 2000 23:57:20 +0000 (23:57 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 15 Jul 2000 23:57:20 +0000 (23:57 +0000)
* ld-elfvsb/elfvsb.exp (visibility_run): Set expected failure
for "protected_undef_def".

* ld-elfvsb/main.c: Don't define HIDDEN_UNDEF_TEST when
PROTECTED_WEAK_TEST is defined.
Don't define PROTECTED_UNDEF_TEST when PROTECTED_WEAK_TEST is
defined.
Define PROTECTED_TEST when PROTECTED_UNDEF_TEST is defined.

* ld-elfvsb/sh1.c (visibility): Mark protected only if
PROTECTED_TEST, PROTECTED_UNDEF_TEST or PROTECTED_WEAK_TEST
is defined.
(visibility_var): Likewise.

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

index 894cdeb59bd6a9798f88dc59fbe3f6607188b6dd..58a112417d08169031088d4337b4a0fb90fc98a3 100644 (file)
@@ -1,3 +1,19 @@
+2000-07-15  H.J. Lu  (hjl@gnu.org)
+
+       * ld-elfvsb/elfvsb.exp (visibility_run): Set expected failure
+       for "protected_undef_def".
+
+       * ld-elfvsb/main.c: Don't define HIDDEN_UNDEF_TEST when
+       PROTECTED_WEAK_TEST is defined.
+       Don't define PROTECTED_UNDEF_TEST when PROTECTED_WEAK_TEST is
+       defined.
+       Define PROTECTED_TEST when PROTECTED_UNDEF_TEST is defined.
+
+       * ld-elfvsb/sh1.c (visibility): Mark protected only if
+       PROTECTED_TEST, PROTECTED_UNDEF_TEST or PROTECTED_WEAK_TEST
+       is defined.
+       (visibility_var): Likewise.
+
 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
 
        * ld-srec/srec.exp: xfail hppa.
index 3c45e511e1d71071b60aa3cd63e2f63f109c1c8b..e3a010ed10c74054c191d3b4cc87d42d854f24a3 100644 (file)
@@ -213,7 +213,8 @@ proc visibility_run {visibility} {
        } else {
            # SunOS non PIC shared libraries don't permit some cases of
            # overriding.
-           if [ string match $visibility "protected" ] {
+           if { [ string match $visibility "protected" ]
+                || [ string match $visibility "protected_undef_def" ] } {
                setup_xfail $target_triplet
            } else {
                setup_xfail "*-*-sunos4*"
@@ -224,7 +225,8 @@ proc visibility_run {visibility} {
            # address for the library.  Near as I can tell, the R_*_RELATIVE
            # relocations for various targets are broken in the case where
            # the load address is not zero (which is the default).
-           if [ string match $visibility "protected" ] {
+           if { [ string match $visibility "protected" ]
+                || [ string match $visibility "protected_undef_def" ] } {
                setup_xfail $target_triplet
            } else {
                setup_xfail "*-*-sunos4*"
@@ -241,7 +243,8 @@ proc visibility_run {visibility} {
            || ![ld_compile "$CC $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
            unresolved "visibility ($visibility)"
        } else {
-           if [ string match $visibility "protected" ] {
+           if { [ string match $visibility "protected" ]
+                || [ string match $visibility "protected_undef_def" ] } {
                setup_xfail $target_triplet
            }
            # SunOS can not compare function pointers correctly
@@ -266,7 +269,8 @@ proc visibility_run {visibility} {
            } else {
                # SunOS non PIC shared libraries don't permit some cases of
                # overriding.
-               if [ string match $visibility "protected" ] {
+               if { [ string match $visibility "protected" ]
+                    || [ string match $visibility "protected_undef_def" ] } {
                    setup_xfail $target_triplet
                } else {
                    setup_xfail "*-*-sunos4*"
@@ -278,7 +282,8 @@ proc visibility_run {visibility} {
        }
 
        if { [file exists $tmpdir/sh1p.o ] && [ file exists $tmpdir/sh2p.o ] } {
-           if [ string match $visibility "protected" ] {
+           if { [ string match $visibility "protected" ]
+                || [ string match $visibility "protected_undef_def" ] } {
                setup_xfail $target_triplet
            }
            if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
index eef5c01ba0445e692997876cdf45f7e7b8f46a2f..0aaa83515a75a93f4704e4a437de584752819fbe 100644 (file)
@@ -27,15 +27,17 @@ extern int visibility_varval ();
 extern void *visibility_varptr ();
 
 #ifdef HIDDEN_WEAK_TEST
-#define HIDDEN_UNDEF_TEST
 #define WEAK_TEST
 #endif
 
 #ifdef PROTECTED_WEAK_TEST
-#define PROTECTED_UNDEF_TEST
 #define WEAK_TEST
 #endif
 
+#ifdef PROTECTED_UNDEF_TEST
+#define PROTECTED_TEST
+#endif
+
 #ifndef WEAK_TEST
 extern int visibility ();
 extern int visibility_var;
index 5a140a8c3e01d18139693dffe11f9f1cc195259a..2299f83bdc36715fcc8a3fb6e8b777f03a794d2e 100644 (file)
@@ -312,9 +312,11 @@ visibility_varval ()
 asm (".hidden visibility");
 asm (".hidden visibility_var");
 #else
+#if defined (PROTECTED_TEST) || defined (PROTECTED_UNDEF_TEST) || defined (PROTECTED_WEAK_TEST)
 asm (".protected visibility");
 asm (".protected visibility_var");
 #endif
+#endif
 
 #ifdef WEAK_TEST
 asm (".weak visibility");