[PATCH] D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 18:45:54 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Arch/ARM.cpp:66
   NeedsThunks = true;
+  // Pre-created ThunkSections are spaced roughly 16Mib apart on ARM. This is to
+  // match the most common expected case of a Thumb 2 encoded BL, BLX or B.W
----------------
nit: add blank lines before comments.


================
Comment at: ELF/Relocations.h:138-148
   ThunkSection *getISThunkSec(InputSection *IS, OutputSection *OS);
-  void forEachExecInputSection(
+  void
+  createInitialThunkSections(ArrayRef<OutputSection *> OutputSections);
+  void forEachExecInputSectionRange(
       ArrayRef<OutputSection *> OutputSections,
-      std::function<void(OutputSection *, std::vector<InputSection *> *,
-                         InputSection *)>
+      std::function<void(OutputSection *, std::vector<InputSection *> *)>
           Fn);
----------------
Can you add blank lines between multi-line declarations?


================
Comment at: ELF/Relocations.h:165-166
   // passes
   std::map<std::vector<InputSection *> *, std::vector<ThunkSection *>>
       ThunkSections;
 };
----------------
This map is essentially a map from an `InputSectionDescription` to its thunks, right? Does it make more sense to add `std::vector<ThunkSection *>` to `InputSectionDescription`?


https://reviews.llvm.org/D34689





More information about the llvm-commits mailing list