aarch64: Fix PAuth_LR tests for aarch64-pe
Patch to fix aarch64-pe PAuth_LR tests due to a non-representable section alignment.
This patch addresses a failure in aarch64-pe PAuth_LR tests caused by an excessively large section alignment (.balign 0x40000). The proposed fix replaces the alignment directive with ‘.org’-based padding and adjusts the expected disassembly to accommodate PE/COFF symbol spelling differences. This aims to resolve test failures and ensure correct object file generation for the aarch64 architecture on PE/COFF systems.
- proposer
Presents a patch to fix aarch64-pe PAuth_LR test failures, which were caused by an unrepresentable section alignment, by using .org padding and relaxing disassembly expectations.
“It addresses the aarch64-pe failure reported by Alan [1], where the PAuth_LR tests used .balign 0x40000 and caused a non-representable 2**18 .text section alignment for PE/COFF objects.”
In Details
The patch modifies aarch64 test cases for PE/COFF object files. Specifically, it addresses an issue where the .balign 0x40000 directive in PAuth_LR tests caused an alignment value (2^18) that is not representable in PE/COFF object files. The fix involves replacing .balign with .org for padding and adjusting the expected disassembly output to account for PE/COFF symbol naming conventions.
- aarch64
- The 64-bit ARM architecture.
- PE/COFF
- Portable Executable/Common Object File Format, a file format used for executables, object code, and DLLs on 32-bit and 64-bit versions of Windows operating systems. Sourceware uses this for some cross-compilation targets.
- PAuth_LR
- Pointer Authentication for Link Register. A security feature on ARM architectures that uses cryptographic techniques to protect the Link Register from unauthorized modification.
- .balign
- An assembler directive used to align the next piece of code or data to a specified boundary.
- .org
- An assembler directive that sets the current assembly position to a specific address. It can be used for padding by specifying an address beyond the current position.
- symbol spelling
- The specific way a symbol (like a function or variable name) is represented or named in an object file. Different formats or conventions can lead to variations.