diff options
Diffstat (limited to 'ld/testsuite/ld-elfvsb/sh1.c')
-rw-r--r-- | ld/testsuite/ld-elfvsb/sh1.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfvsb/sh1.c b/ld/testsuite/ld-elfvsb/sh1.c index 41bc493..2b9b9ee 100644 --- a/ld/testsuite/ld-elfvsb/sh1.c +++ b/ld/testsuite/ld-elfvsb/sh1.c @@ -323,3 +323,54 @@ asm (".protected visibility"); asm (".protected visibility_var"); #endif #endif + +#ifdef HIDDEN_NORMAL_TEST +int shlib_visibility_com; +asm (".hidden shlib_visibility_com"); + +int +shlib_visibility_checkcom () +{ + return shlib_visibility_com == 0; +} + +int +shlib_visibility_checkweak () +{ + return 1; +} +#else +int +shlib_visibility_checkcom () +{ + return 1; +} + +int +shlib_visibility_checkweak () +{ + return 1; +} +#endif + +#ifdef PROTECTED_TEST +int shared_data = 100; + +int * +shared_data_p () +{ + return &shared_data; +} + +int +shared_func () +{ + return 100; +} + +void * +shared_func_p () +{ + return shared_func; +} +#endif |