diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-11-08 15:56:54 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-11-08 16:02:50 -0800 |
commit | dc8d2d90da3f191ae0461900ab98e3b29cc2b280 (patch) | |
tree | 810c9e619488f444ac0079866dc15714da1a2d9f /gold/symtab.h | |
parent | cb1a122cce8a7eefe1025d8d189c52f96da6138f (diff) | |
download | gdb-dc8d2d90da3f191ae0461900ab98e3b29cc2b280.zip gdb-dc8d2d90da3f191ae0461900ab98e3b29cc2b280.tar.gz gdb-dc8d2d90da3f191ae0461900ab98e3b29cc2b280.tar.bz2 |
gold: Ignore def/ref from a dynamic object for special symbols
Since special symbol must be defined in a regular object, definition
from a dynamic object should be ignored. If special symbol has the
hidden or internal visibility, reference from a dynamic object should
also be ignored. Also __start and __stop symbols in a dynamic object
shouldn't be preempted.
PR gold/22291
* layout.cc (Layout::define_section_symbols): Use STV_PROTECTED
for __start and __stop symbols.
* symtab.cc (Symbol_table::define_special_symbol): Add an
argument, visibility. Ignore definition and reference from
a dynamic object, depending on visibility.
(Symbol_table::do_define_in_output_data): Pass visibility to
define_special_symbol.
(Symbol_table::do_define_in_output_segment): Likewise.
(Symbol_table::do_define_as_constant): Likewise.
(Symbol_table::add_undefined_symbol_from_command_line): Pass
STV_DEFAULT to define_special_symbol.
* symtab.h (Symbol_table::define_special_symbol): Add an
argument, visibility.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r-- | gold/symtab.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/symtab.h b/gold/symtab.h index a67d5eb..edf1c17 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -1830,7 +1830,8 @@ class Symbol_table template<int size, bool big_endian> Sized_symbol<size>* define_special_symbol(const char** pname, const char** pversion, - bool only_if_ref, Sized_symbol<size>** poldsym, + bool only_if_ref, elfcpp::STV visibility, + Sized_symbol<size>** poldsym, bool* resolve_oldsym, bool is_forced_local); // Define a symbol in an Output_data, sized version. |