aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-05-05 05:46:53 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-05-05 05:46:53 +0000
commitef5aade5aca46a8f4244c7185fecbadbc32e50fa (patch)
treece0667846200306b0d014e816dd21bd8f6a6aaab /ld/testsuite
parent839efa267fa3c2517d3f5072102a03415f7bad5a (diff)
downloadgdb-ef5aade5aca46a8f4244c7185fecbadbc32e50fa.zip
gdb-ef5aade5aca46a8f4244c7185fecbadbc32e50fa.tar.gz
gdb-ef5aade5aca46a8f4244c7185fecbadbc32e50fa.tar.bz2
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/ChangeLog5
-rw-r--r--ld/testsuite/ld-elfvsb/main.c31
-rw-r--r--ld/testsuite/ld-elfvsb/sh1.c31
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 ()