Skip to content

Commit bb63e36

Browse files
authoredJun 24, 2024··
Set alignment=1 for ELF debug sections (#103867)
1 parent d38e559 commit bb63e36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ElfObjectWriter.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ private protected override void CreateSection(ObjectNodeSection section, string
141141
{
142142
Type = type,
143143
Flags = flags,
144+
Alignment = 1
144145
},
145146
Name = sectionName,
146147
Stream = sectionStream,
@@ -689,7 +690,7 @@ private void EmitObjectFile<TSize>(FileStream outputFileStream)
689690
{
690691
_stringTable.ReserveString(section.Name);
691692

692-
if (section.SectionHeader.Alignment > 0)
693+
if (section.SectionHeader.Alignment > 1)
693694
{
694695
currentOffset = (ulong)((currentOffset + (ulong)section.SectionHeader.Alignment - 1) & ~(ulong)(section.SectionHeader.Alignment - 1));
695696
}

0 commit comments

Comments
 (0)
Please sign in to comment.