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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 13:40:51 PST 2016


ruiu added inline comments.


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


================
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()) {
----------------
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.


https://reviews.llvm.org/D26130





More information about the llvm-commits mailing list