[PATCH] D71520: [ELF] Rename .plt to .iplt and decrease EM_PPC{,64} alignment of .glink to 4

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 15 23:01:43 PST 2019


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


================
Comment at: lld/ELF/SyntheticSections.cpp:2453
     name = ".glink";
+    alignment = 4;
   }
----------------
ruiu wrote:
> Could you add a comment explaining why PPC is special?
I think the user will likely also read `PPC64.cpp:writePlt` to understand why its alignment is different. The comment may be redundant. (.glink is a series of bl instructions. Over-aligning to 16 does not improve anything.)

It is not that PPC is special. I think x86/ARM/AArch64 just happen to find 32 is the optimal alignment. Though, I believe on AArch64, at least with -z pac-plt or -z bti, 16 as the alignment is no longer optimal or necessary.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71520





More information about the llvm-commits mailing list