summaryrefslogtreecommitdiff
path: root/bfd/elf32-cris.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r--bfd/elf32-cris.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index ef8c95193cc..30570ee4eba 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1930,6 +1930,9 @@ elf_cris_adjust_gotplt_to_got (h, p)
BFD_ASSERT (dynobj != NULL);
+ if (h->root.root.type == bfd_link_hash_warning)
+ h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
+
/* If nobody wanted a GOTPLT with this symbol, we're done. */
if (h->gotplt_refcount <= 0)
return true;
@@ -2881,6 +2884,9 @@ elf_cris_discard_excess_dso_dynamics (h, inf)
struct elf_cris_pcrel_relocs_copied *s;
struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ if (h->root.root.type == bfd_link_hash_warning)
+ h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
+
/* If a symbol has been forced local or we have found a regular
definition for the symbolic link case, then we won't be needing
any relocs. */
@@ -2906,6 +2912,9 @@ elf_cris_discard_excess_program_dynamics (h, inf)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ if (h->root.root.type == bfd_link_hash_warning)
+ h = (struct elf_cris_link_hash_entry *) h->root.root.u.i.link;
+
/* If we're not creating a shared library and have a symbol which is
referred to by .got references, but the symbol is defined locally,
(or rather, not referred to by a DSO and not defined by a DSO) then