llvm-project/lld/test/ELF/invalid/section-alignment.test
Fangrui Song 2f09bd2fc2 [ELF,test] Improve error/warning message checks
Update tests to include proper `error:` or `warning:` prefixes and
file/section information in CHECK patterns. Add
--implicit-check-not=error: to ensure no unexpected errors are produced.
2026-02-01 11:25:22 -08:00

23 lines
750 B
Plaintext

# RUN: yaml2obj %s -o %t
# RUN: not ld.lld %t -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERROR
# RUN: ld.lld %t -o /dev/null --noinhibit-exec 2>&1 | FileCheck %s --check-prefix=WARN
## In current lld implementation, we do not accept sh_addralign
## larger than UINT32_MAX.
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x1000000000000000
Offset: 0x100
Content: "00000000"
# ERROR: error: {{.*}}: section sh_addralign is too large
# WARN: warning: {{.*}}: section sh_addralign is too large