[PATCH] D60042: [llvm-objcopy] Add --prefix-alloc-sections

Seiya Nuta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 28 20:01:28 PDT 2019


seiya marked an inline comment as done.
seiya added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp:629
+            // section comes *before* the target section, we add the prefix.
+            if (PrefixedSections.find(TargetSec->Name) !=
+                PrefixedSections.end()) {
----------------
jakehehrlich wrote:
> I'm *really* against doing this kind of string searching when we can build a map. What if a section already contains the prefix being used. This won't be consistent in that case.
> 
> Also you should add a test case for that above.
Let me clarify my understanding a bit. You mean a map which contains a pointer to a section like `DenseSet<SectionBase *> PrefixedSections`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60042/new/

https://reviews.llvm.org/D60042





More information about the llvm-commits mailing list