[PATCH] D35910: Make __start_sec __end_sec handling more precise
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 13:20:23 PDT 2017
pcc added inline comments.
================
Comment at: ELF/LTO.cpp:127
+ DenseSet<StringRef> UsedStartStop;
+ for (Symbol *Sym : Symtab->getSymbols()) {
+ StringRef Name = Sym->body()->getName();
----------------
Probably better to move this loop to the `BitcodeCompiler` ctor to avoid quadratic complexity.
================
Comment at: ELF/LTO.cpp:129
+ StringRef Name = Sym->body()->getName();
+ for (StringRef Prefix : {"__start_", "__end_"})
+ if (Name.startswith(Prefix))
----------------
Should this be `__stop_` instead of `__end_`?
https://reviews.llvm.org/D35910
More information about the llvm-commits
mailing list