diff options
Diffstat (limited to 'gold/target-reloc.h')
-rw-r--r-- | gold/target-reloc.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h index b544c78..d609bcb 100644 --- a/gold/target-reloc.h +++ b/gold/target-reloc.h @@ -144,6 +144,12 @@ class Default_comdat_behavior } }; +inline bool +is_strong_undefined(const Symbol* sym) +{ + return sym->is_undefined() && sym->binding() != elfcpp::STB_WEAK; +} + // Give an error for a symbol with non-default visibility which is not // defined locally. @@ -411,16 +417,10 @@ relocate_section( } if (issue_undefined_symbol_error(sym)) - { - gold_undefined_symbol_at_location(sym, relinfo, i, offset); - if (sym->is_cxx_vtable()) - gold_info(_("%s: the vtable symbol may be undefined because " - "the class is missing its key function"), - program_name); - } + gold_undefined_symbol_at_location(sym, relinfo, i, offset); else if (sym != NULL && sym->visibility() != elfcpp::STV_DEFAULT - && (sym->is_undefined() || sym->is_from_dynobj())) + && (is_strong_undefined(sym) || sym->is_from_dynobj())) visibility_error(sym); if (sym != NULL && sym->has_warning()) |