[PATCH] D72344: [LLD][ELF][ARM][AArch64] Only round up ThunkSection Size when large OS.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 16:22:46 PST 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Relocations.cpp:1772
+    //     that code.
+    // 2.) The InputSectionDescription is smaller than 4 KiB. This will prevent
+    //     any assertion failures that an InputSectionDescription is < 4 KiB
----------------
larger? (` isdLimit - isdBase > 4096`)


================
Comment at: lld/ELF/Relocations.cpp:1775
+    //     in size.
+    if (isdBase + target->getThunkSectionSpacing() < os->size &&
+        isdLimit - isdBase > 4096) {
----------------
Can we simplify `isdBase + target->getThunkSectionSpacing() < os->size` to `off + target->getThunkSectionSpacing() < os->size`


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

https://reviews.llvm.org/D72344





More information about the llvm-commits mailing list