[PATCH] D13934: [ELF2] --strip-all/-s command line implemented
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 21 05:23:29 PDT 2015
ruiu added inline comments.
================
Comment at: ELF/Writer.cpp:113-115
@@ -111,4 +112,5 @@
Out<ELFT>::Plt = &Plt;
- SymbolTableSection<ELFT> SymTab(*Symtab, *Out<ELFT>::StrTab);
- Out<ELFT>::SymTab = &SymTab;
- SymbolTableSection<ELFT> DynSymTab(*Symtab, *Out<ELFT>::DynStrTab);
+ SymbolTableSection<ELFT> SymTab(*Symtab, Out<ELFT>::StrTab);
+ if (!Config->StripAll)
+ Out<ELFT>::SymTab = &SymTab;
+ SymbolTableSection<ELFT> DynSymTab(*Symtab, Out<ELFT>::DynStrTab);
----------------
This is a bit confusing. Let's do this
std::unique_ptr<SymbolTableSection<ELFT>> SymTab;
if (!Config->StripAll) {
SymTab.reset(new SymbolTableSection<ELFT>(*Symtab, *Out<ELFT>::StrTab);
Out<ELFT>::SymTab = SymTab.get();
}
http://reviews.llvm.org/D13934
More information about the llvm-commits
mailing list