[PATCH] D26130: [ELF] - Implemented --symbol-ordering-file option.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 01:31:20 PST 2016


grimar added inline comments.


================
Comment at: ELF/SymbolListFile.cpp:60
+
+// Parse the --symbol-ordering-file argument. File has form:
+// symbolName1
----------------
ruiu wrote:
> This function should live in Driver.cpp as this has nothing to do with ScriptParser class.
Done.


================
Comment at: ELF/Writer.cpp:659
+  DenseMap<InputSectionBase<ELFT> *, unsigned> SectionsOrder;
+  for (elf::ObjectFile<ELFT> *File : Symtab<ELFT>::X->getObjectFiles()) {
+    for (SymbolBody *Body : File->getSymbols()) {
----------------
ruiu wrote:
> I think we should iterate over Config->SymbolOrderingFile and use SymbolTable::find() instead of iterating over all symbols because the former should be much faster than the latter.
As Rafael already pointed out, there is no local symbols in symbol table.


https://reviews.llvm.org/D26130





More information about the llvm-commits mailing list