diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2008-07-31 07:27:52 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2008-07-31 07:27:52 +0000 |
commit | 49314f8728c7d2fcfcaa20771bf7a453901db081 (patch) | |
tree | acd741aa05e90c67eb177b03badd9caa8135ae47 /ld | |
parent | 2f9300efcdb2abb98ac68fbeafed47ac956c0d26 (diff) | |
download | gdb-49314f8728c7d2fcfcaa20771bf7a453901db081.zip gdb-49314f8728c7d2fcfcaa20771bf7a453901db081.tar.gz gdb-49314f8728c7d2fcfcaa20771bf7a453901db081.tar.bz2 |
2008-07-31 Takashi Ono <t_ono@hkfreak.net>
* pe-dll.c (generate_relocs): Don't generate relocs for
undefined weak symbols.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/pe-dll.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 6388638..e6d84b3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2008-07-31 Takashi Ono <t_ono@hkfreak.net> + + * pe-dll.c (generate_relocs): Don't generate relocs for + undefined weak symbols. + 2008-07-31 Jan Kratochvil <jan.kratochvil@redhat.com> * emultempl/spuelf.em: Abort on the missing required `spu_ovl.o'. diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 692f80f..c6c656a 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -1256,6 +1256,16 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info) bfd_vma sym_vma; struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr; + /* Don't create relocs for undefined weak symbols. */ + if (sym->flags == BSF_WEAK) + { + struct bfd_link_hash_entry *blhe + = bfd_link_hash_lookup (info->hash, sym->name, + FALSE, FALSE, FALSE); + if (!blhe || blhe->type != bfd_link_hash_defined) + continue; + } + sym_vma = (relocs[i]->addend + sym->value + sym->section->vma |