## An empty dynamic section is invalid. Test we report a warning instead of an ## error, so that dumping can continue with other objects. # RUN: yaml2obj %s --docnum=1 -o %t.empty # RUN: llvm-objdump -p %t.empty 2>&1 | FileCheck %s -DFILE=%t.empty --check-prefix=EMPTY # EMPTY: Program Header: # EMPTY-NEXT: warning: '[[FILE]]': invalid empty dynamic section # EMPTY-EMPTY: --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_EXEC Machine: EM_X86_64 Sections: - Name: .dynamic Type: SHT_DYNAMIC # RUN: yaml2obj %s --docnum=2 -o %t.nonull # RUN: llvm-objdump -p %t.nonull 2>&1 | FileCheck %s -DFILE=%t.nonull --check-prefix=NONULL # NONULL: Program Header: # NONULL-NEXT: warning: '[[FILE]]': dynamic sections must be DT_NULL terminated # NONULL-EMPTY: --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_EXEC Machine: EM_X86_64 Sections: - Name: .dynamic Type: SHT_DYNAMIC Entries: - Tag: DT_SONAME Value: 1