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

Florin Popa via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 01:58:46 PST 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) && Section->isText()) {
+      Section->setAlignment(Align(4));
+      emitValueToAlignment(Align(4), 0, 1, 0);
----------------
popaflorin wrote:

This was a leftover from initial testing and I forgot to remove it.  I have now corrected it in the latest patch 

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


More information about the llvm-commits mailing list