aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.h
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2001-03-11 13:10:51 +0000
committerPhil Blundell <philb@gnu.org>2001-03-11 13:10:51 +0000
commitd982ba7301f23611ea22b679d083c90ea640c041 (patch)
treee016dfcf342ed9f5adbbd814cd5919756ff00021 /bfd/elf32-arm.h
parent8aa30e60ce16468892f60cf7ea377f0d83861ab0 (diff)
downloadgdb-d982ba7301f23611ea22b679d083c90ea640c041.zip
gdb-d982ba7301f23611ea22b679d083c90ea640c041.tar.gz
gdb-d982ba7301f23611ea22b679d083c90ea640c041.tar.bz2
2001-03-11 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT entries that could serve as a definition for a weak symbol.
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r--bfd/elf32-arm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 9129b8e..58edefe 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -3197,6 +3197,13 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Mark the symbol as undefined, rather than as defined in
the .plt section. Leave the value alone. */
sym->st_shndx = SHN_UNDEF;
+ /* If the symbol is weak, we do need to clear the value.
+ Otherwise, the PLT entry would provide a definition for
+ the symbol even if the symbol wasn't defined anywhere,
+ and so the symbol would never be NULL. */
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
+ == 0)
+ sym->st_value = 0;
}
}