James Henderson | 416603e | 2019-02-27 16:41:59 +0000 | [diff] [blame] | 1 | # Show that llvm-readobj can handle an empty .dynamic section. |
| 2 | |
| 3 | # RUN: yaml2obj %s -o %t.o |
| 4 | # RUN: llvm-readobj --dynamic-table %t.o | FileCheck %s --check-prefix LLVM |
| 5 | # RUN: llvm-readelf --dynamic-table %t.o | FileCheck %s --check-prefix GNU --allow-empty |
| 6 | |
| 7 | # LLVM: File: {{.*}}.o |
| 8 | # LLVM-NOT: DynamicSection |
| 9 | # GNU-NOT: {{.}} |
| 10 | |
| 11 | !ELF |
| 12 | FileHeader: |
| 13 | Class: ELFCLASS64 |
| 14 | Data: ELFDATA2LSB |
| 15 | Type: ET_EXEC |
| 16 | Machine: EM_X86_64 |
| 17 | Sections: |
| 18 | - Name: .dynamic |
| 19 | Type: SHT_DYNAMIC |
| 20 | Address: 0x1000 |
| 21 | ProgramHeaders: |
| 22 | - Type: PT_LOAD |
| 23 | VAddr: 0x1000 |
| 24 | Sections: |
| 25 | - Section: .dynamic |
| 26 | - Type: PT_DYNAMIC |
| 27 | VAddr: 0x1000 |
| 28 | Sections: |
| 29 | - Section: .dynamic |