diff options
author | Nick Clifton <nickc@redhat.com> | 2003-08-20 08:37:19 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-08-20 08:37:19 +0000 |
commit | 560e09e9cc912370081be5cccb8d3179a78928b2 (patch) | |
tree | 9191f0c21af30761875fd1741d540eacdea7b88f /bfd/elf32-sh.c | |
parent | 04d1ab347d16d701221fa1b49185d096e3158138 (diff) | |
download | gdb-560e09e9cc912370081be5cccb8d3179a78928b2.zip gdb-560e09e9cc912370081be5cccb8d3179a78928b2.tar.gz gdb-560e09e9cc912370081be5cccb8d3179a78928b2.tar.bz2 |
Better handking for unresolved symbols
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index b509536..368bbca 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -4663,6 +4663,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { + /* FIXME: Ought to make use of the RELOC_FOR_GLOBAL_SYMBOL macro. */ + /* Section symbol are never (?) placed in the hash table, so we can just ignore hash relocations when creating a relocatable object file. */ @@ -4765,16 +4767,17 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; else if (! info->executable - && ! info->no_undefined + && info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, - (info->executable || info->no_undefined - || ELF_ST_VISIBILITY (h->other))))) + if (! info->callbacks->undefined_symbol + (info, h->root.root.string, input_bfd, + input_section, rel->r_offset, + ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) + || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) + || ELF_ST_VISIBILITY (h->other)))) return FALSE; relocation = 0; } |