2008-07-31 Takashi Ono <t_ono@hkfreak.net>
* pe-dll.c (generate_relocs): Don't generate relocs for undefined weak symbols.
This commit is contained in:
parent
2f9300efcd
commit
49314f8728
2 changed files with 15 additions and 0 deletions
10
ld/pe-dll.c
10
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue