diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvsb/main.c | 31 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvsb/sh1.c | 31 |
3 files changed, 67 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index dcd5724..10d1ddd 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2003-05-04 H.J. Lu <hjl@gnu.org> + * ld-elfvsb/main.c: Updated. + * ld-elfvsb/sh1.c: Likewise. + +2003-05-04 H.J. Lu <hjl@gnu.org> + * ld-elfvers/vers18.dsym: Updated for weak definiton change. * ld-elfvers/vers18.ver: Likewise. * ld-elfvers/vers19.ver: Likewise. diff --git a/ld/testsuite/ld-elfvsb/main.c b/ld/testsuite/ld-elfvsb/main.c index 6ce97bf..1ce2e3e 100644 --- a/ld/testsuite/ld-elfvsb/main.c +++ b/ld/testsuite/ld-elfvsb/main.c @@ -165,6 +165,37 @@ main_visibility_checkweak () { return 1; } +#elif defined (HIDDEN_WEAK_TEST) +int +main_visibility_checkcom () +{ + return 1; +} + +#pragma weak visibility_undef_var_weak +extern int visibility_undef_var_weak; +asm (".hidden visibility_undef_var_weak"); + +#pragma weak visibility_undef_func_weak +extern int visibility_undef_func_weak (); +asm (".hidden visibility_undef_func_weak"); + +#pragma weak visibility_var_weak +extern int visibility_var_weak; +asm (".hidden visibility_var_weak"); + +#pragma weak visibility_func_weak +extern int visibility_func_weak (); +asm (".hidden visibility_func_weak"); + +int +main_visibility_checkweak () +{ + return &visibility_undef_var_weak == NULL + && &visibility_undef_func_weak == NULL + && &visibility_func_weak == NULL + && &visibility_var_weak == NULL; +} #elif defined (HIDDEN_UNDEF_TEST) extern int visibility_def; asm (".hidden visibility_def"); diff --git a/ld/testsuite/ld-elfvsb/sh1.c b/ld/testsuite/ld-elfvsb/sh1.c index 2b9b9ee..8d9fcdb 100644 --- a/ld/testsuite/ld-elfvsb/sh1.c +++ b/ld/testsuite/ld-elfvsb/sh1.c @@ -339,6 +339,37 @@ shlib_visibility_checkweak () { return 1; } +#elif defined (HIDDEN_WEAK_TEST) +#pragma weak shlib_visibility_undef_var_weak +extern int shlib_visibility_undef_var_weak; +asm (".hidden shlib_visibility_undef_var_weak"); + +#pragma weak shlib_visibility_undef_func_weak +extern int shlib_visibility_undef_func_weak (); +asm (".hidden shlib_visibility_undef_func_weak"); + +#pragma weak shlib_visibility_var_weak +extern int shlib_visibility_var_weak; +asm (".hidden shlib_visibility_var_weak"); + +#pragma weak shlib_visibility_func_weak +extern int shlib_visibility_func_weak (); +asm (".hidden shlib_visibility_func_weak"); + +int +shlib_visibility_checkcom () +{ + return 1; +} + +int +shlib_visibility_checkweak () +{ + return &shlib_visibility_undef_var_weak == NULL + && &shlib_visibility_undef_func_weak == NULL + && &shlib_visibility_func_weak == NULL + && &shlib_visibility_var_weak == NULL; +} #else int shlib_visibility_checkcom () |