1## If an object contains a common symbol with zero alignment, 2## check we report it. 3# RUN: yaml2obj --docnum=1 %s -o %t1.o 4# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s 5# CHECK: common symbol 'bar' has invalid alignment: 0 6 7--- !ELF 8FileHeader: 9 Class: ELFCLASS64 10 Data: ELFDATA2LSB 11 Type: ET_REL 12 Machine: EM_X86_64 13Symbols: 14 - Name: bar 15 Type: STT_FUNC 16 Index: SHN_COMMON 17 Binding: STB_GLOBAL 18 19## If an object contains a common symbol with alignment greater 20## than UINT32_MAX, check we report it. 21# RUN: yaml2obj --docnum=2 %s -o %t2.o 22# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=BIG 23# BIG: common symbol 'bar' has invalid alignment: 271644049215 24 25--- !ELF 26FileHeader: 27 Class: ELFCLASS64 28 Data: ELFDATA2LSB 29 Type: ET_REL 30 Machine: EM_X86_64 31Symbols: 32 - Name: bar 33 Type: STT_FUNC 34 Index: SHN_COMMON 35 Value: 0x0000003F3F3F3F3F 36 Binding: STB_GLOBAL 37