summaryrefslogtreecommitdiff
path: root/bfd/elf-hppa.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r--bfd/elf-hppa.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 8e477bda64a..63d95c5016e 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1079,6 +1079,9 @@ elf_hppa_unmark_useless_dynamic_symbols (h, data)
{
struct bfd_link_info *info = (struct bfd_link_info *)data;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
/* If we are not creating a shared library, and this symbol is
referenced by a shared library but is not defined anywhere, then
the generic code will warn that it is undefined.
@@ -1112,6 +1115,9 @@ elf_hppa_remark_useless_dynamic_symbols (h, data)
{
struct bfd_link_info *info = (struct bfd_link_info *)data;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
/* If we are not creating a shared library, and this symbol is
referenced by a shared library but is not defined anywhere, then
the generic code will warn that it is undefined.