[llvm] [AArch64][ELF] Section alignment of 4 for AArch64 instruction (PR #114031)

Florin Popa via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 07:07:23 PDT 2024


================
@@ -202,6 +202,12 @@ class AArch64ELFStreamer : public MCELFStreamer {
       LastEMS = EMS_None;
 
     MCELFStreamer::changeSection(Section, Subsection);
+
+    // Section alignment of 4 to match GNU Assembler
+    if (Section->getAlign() < 4) {
----------------
popaflorin wrote:

Thank you both for your feedback! I haven't figured out how to do that yet in this AArch64ELFStreamer. I thought this will suffice: `Section->hasInstructions()` for a check but it always comes back as 0. I'm looking into it... 

https://github.com/llvm/llvm-project/pull/114031


More information about the llvm-commits mailing list