Linker garbage collection should not collect unreferenced symbols if they are externally visible and export-dynamic is on
Ian Lance Taylor
iant@google.com
Mon Oct 31 21:24:00 GMT 2011
More information about the Binutils mailing list
Mon Oct 31 21:24:00 GMT 2011
- Previous message (by thread): Linker garbage collection should not collect unreferenced symbols if they are externally visible and export-dynamic is on
- Next message (by thread): Linker garbage collection should not collect unreferenced symbols if they are externally visible and export-dynamic is on
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sriraman Tallam <tmsriram@google.com> writes: > * symtab.h (Symbol_table::gc_mark_symbol_for_shlib): Rename to > gc_mark_symbol. > * symtab.cc (Symbol_table::gc_mark_symbol_for_shlib): Rename to > gc_mark_symbol. > Change to just keep the section associated with symbol. > (Symbol_table::add_from_relobj): Mark symbols as not garbage when > they are externally visible and --export-dynamic is turned on. > (Symbol_table::gc_mark_dyn_syms): Call gc_mark_symbol. > void > -Symbol_table::gc_mark_symbol_for_shlib(Symbol* sym) > +Symbol_table::gc_mark_symbol(Symbol* sym) > { > - if (!sym->is_from_dynobj() > - && sym->is_externally_visible()) > + //Add the object and section to the work list. Space after "//". > @@ -626,16 +622,7 @@ Symbol_table::gc_mark_dyn_syms(Symbol* s > { > if (sym->in_dyn() && sym->source() == Symbol::FROM_OBJECT > && !sym->object()->is_dynamic()) > - { > - Relobj* obj = static_cast<Relobj*>(sym->object()); > - bool is_ordinary; > - unsigned int shndx = sym->shndx(&is_ordinary); > - if (is_ordinary && shndx != elfcpp::SHN_UNDEF) > - { > - gold_assert(this->gc_ != NULL); > - this->gc_->worklist().push(Section_id(obj, shndx)); > - } > - } > + gc_mark_symbol(sym); > } Write this->gc_mark_symbol(sym); This is OK with those changes. Thanks. Ian
- Previous message (by thread): Linker garbage collection should not collect unreferenced symbols if they are externally visible and export-dynamic is on
- Next message (by thread): Linker garbage collection should not collect unreferenced symbols if they are externally visible and export-dynamic is on
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list