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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 14:46:44 PST 2016


On 8 November 2016 at 16:40, Rui Ueyama <ruiu at google.com> wrote:
> 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.

local symbols are not in the SymbolTable.

Cheers,
Rafael


More information about the llvm-commits mailing list