diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2003-05-05 05:46:53 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2003-05-05 05:46:53 +0000 |
commit | ef5aade5aca46a8f4244c7185fecbadbc32e50fa (patch) | |
tree | ce0667846200306b0d014e816dd21bd8f6a6aaab /ld/testsuite | |
parent | 839efa267fa3c2517d3f5072102a03415f7bad5a (diff) | |
download | ppe42-binutils-ef5aade5aca46a8f4244c7185fecbadbc32e50fa.tar.gz ppe42-binutils-ef5aade5aca46a8f4244c7185fecbadbc32e50fa.zip |
bfd/
2003-05-04 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
relocation entries for weak undefined symbols with non-default
visibility.
(elf_i386_relocate_section): Initialize the GOT entries and
skip R_386_32/R_386_PC32 for weak undefined symbols with
non-default visibility.
* elfxx-ia64.c (allocate_fptr): Don't allocate function
descriptors for weak undefined symbols with non-default
visibility.
(allocate_dynrel_entries): Don't allocate relocation entries
for symbols resolved to 0.
(set_got_entry): Don't install dynamic relocation for weak
undefined symbols with non-default visibility.
(set_pltoff_entry): Likewise.
* elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
with non-default visibility.
(elf_link_output_extsym): Don't make weak undefined symbols
with non-default visibility dynamic.
ld/testsuite/
2003-05-04 H.J. Lu <hjl@gnu.org>
* ld-elfvsb/main.c: Updated.
* ld-elfvsb/sh1.c: Likewise.
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 dcd5724d44..10d1dddf40 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 6ce97bf4b2..1ce2e3eb37 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 2b9b9eeb52..8d9fcdbdcb 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 () |