-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][ELF] Section alignment of 4 for AArch64 instruction (#114031)
The integrated assembler sets a minimum alignment for the .text section of 4. However user defined sections get an alignment of 1. Unlike the GNU assembler which raises the section alignment to 4 if an AArch64 instruction is used, the integrated assembler leaves the alignment at 1 --------- Co-authored-by: Florin Popa <[email protected]>
- Loading branch information
1 parent
229dcf9
commit 301fe47
Showing
3 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// RUN: llvm-mc -triple=aarch64 -filetype=obj -o %t.o %s | ||
// RUN: llvm-readobj -S --sd %t.o | FileCheck %s | ||
.section sec00, "ax" | ||
.byte 1 | ||
.section sec01, "ax" | ||
nop | ||
nop | ||
.section sec02, "ax" | ||
.balign 4 | ||
nop | ||
nop | ||
.section sec03, "ax" | ||
.balign 8 | ||
nop | ||
nop | ||
.section sec04, "ax" | ||
.byte 0 | ||
.section sec05, "aw" | ||
nop | ||
nop | ||
// CHECK: Name: sec00 | ||
// CHECK: AddressAlignment: 4 | ||
// CHECK: Name: sec01 | ||
// CHECK: AddressAlignment: 4 | ||
// CHECK: Name: sec02 | ||
// CHECK: AddressAlignment: 4 | ||
// CHECK: Name: sec03 | ||
// CHECK: AddressAlignment: 8 | ||
// CHECK: Name: sec04 | ||
// CHECK: AddressAlignment: 4 | ||
// CHECK: Name: sec05 | ||
// CHECK: AddressAlignment: 1 |