aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvsb/sh2.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-04-28 03:31:36 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-04-28 03:31:36 +0000
commit1b1fe8feb35ab988cdaf8481fc52ebdbf2db3d93 (patch)
treef9cd4673bf8f9417762ecead3785bcb37244a8a4 /ld/testsuite/ld-elfvsb/sh2.c
parente4c4d240a370f0afc8a29b18f8e07affff9c4177 (diff)
downloadgdb-1b1fe8feb35ab988cdaf8481fc52ebdbf2db3d93.zip
gdb-1b1fe8feb35ab988cdaf8481fc52ebdbf2db3d93.tar.gz
gdb-1b1fe8feb35ab988cdaf8481fc52ebdbf2db3d93.tar.bz2
bfd/
2003-04-27 H.J. Lu <hjl@gnu.org> * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New. (ELF_LINK_DYNAMIC_WEAK): New. * elflink.h (elf_merge_symbol): Add one argument to indicate if a symbol should be skipped. Ignore definitions in dynamic objects for symbols with non-default visibility. (elf_add_default_symbol): Adjusted. (elf_link_add_object_symbols): Check if a symbol should be skipped. Don't merge the visibility field with the one from a dynamic object. (elf_link_check_versioned_symbol): Use undef_bfd. (elf_link_output_extsym): Warn if a forced local symbol is referenced from dynamic objects. Make non-weak undefined symbol with non-default visibility a fatal error. ld/testsuite/ 2003-04-27 H.J. Lu <hjl@gnu.org> * ld-elfvsb/elfvsb.dat: Updated. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvsb/main.c: Likewise. * ld-elfvsb/sh1.c: Likewise. * ld-elfvsb/sh2.c: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elfvsb/sh2.c')
-rw-r--r--ld/testsuite/ld-elfvsb/sh2.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfvsb/sh2.c b/ld/testsuite/ld-elfvsb/sh2.c
index 6ed30bc..ef6b2f1 100644
--- a/ld/testsuite/ld-elfvsb/sh2.c
+++ b/ld/testsuite/ld-elfvsb/sh2.c
@@ -5,6 +5,10 @@
the shared library. */
int shlibvar2 = 4;
+/* This variable is defined here, and shouldn't be used to resolve a
+ reference with non-default visibility in another shared library. */
+int visibility_com = 2;
+
/* This function is called by another file in the shared library. */
int
@@ -21,4 +25,22 @@ visibility ()
}
int visibility_var = 2;
+
+int visibility_def = 2;
+
+int
+visibility_func ()
+{
+ return 2;
+}
+#endif
+
+#ifdef HIDDEN_WEAK_TEST
+int visibility_var_weak = 2;
+
+int
+visibility_func_weak ()
+{
+ return 2;
+}
#endif