Armando Montanez | 56d1812 | 2019-01-18 20:56:03 +0000 | [diff] [blame] | 1 | # RUN: yaml2obj %s -o %t |
| 2 | # RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s |
| 3 | |
| 4 | !ELF |
| 5 | FileHeader: |
| 6 | Class: ELFCLASS64 |
| 7 | Data: ELFDATA2LSB |
| 8 | Type: ET_DYN |
| 9 | Machine: EM_X86_64 |
| 10 | Sections: |
| 11 | - Name: .dynstr |
| 12 | Type: SHT_STRTAB |
| 13 | Flags: [ SHF_ALLOC ] |
| 14 | Address: 0x1000 |
| 15 | # "\0libfoo.so\0libbar.so\0somelib.so\0foo\0" |
| 16 | Content: "006c6962666f6f2e736f006c69626261722e736f00736f6d656c69622e736f00666f6f00" |
| 17 | - Name: .dynamic |
| 18 | Type: SHT_DYNAMIC |
| 19 | Flags: [ SHF_ALLOC ] |
| 20 | Address: 0x1024 |
Armando Montanez | 8367b07 | 2019-01-24 22:39:21 +0000 | [diff] [blame] | 21 | Content: "010000000000000001000000000000000e00000000000000150000000000000001000000000000000b000000000000000a000000000000002400000000000000050000000000000000100000000000000600000000000000001000000000000000000000000000000000000000000000" |
Armando Montanez | 56d1812 | 2019-01-18 20:56:03 +0000 | [diff] [blame] | 22 | # DT_NEEDED 1 (0x01) |
| 23 | # DT_SONAME 21 (0x15) |
| 24 | # DT_NEEDED 11 (0x0b) |
| 25 | # DT_STRSZ 36 (0x24) |
| 26 | # DT_STRTAB 0x1000 |
Armando Montanez | 8367b07 | 2019-01-24 22:39:21 +0000 | [diff] [blame] | 27 | # DT_SYMTAB 0x1000 |
Armando Montanez | 56d1812 | 2019-01-18 20:56:03 +0000 | [diff] [blame] | 28 | # DT_NULL 0x0 |
Armando Montanez | 8367b07 | 2019-01-24 22:39:21 +0000 | [diff] [blame] | 29 | Size: 112 |
Armando Montanez | 56d1812 | 2019-01-18 20:56:03 +0000 | [diff] [blame] | 30 | ProgramHeaders: |
| 31 | - Type: PT_LOAD |
| 32 | Flags: [ PF_R ] |
| 33 | VAddr: 0x1000 |
| 34 | PAddr: 0x1000 |
| 35 | Align: 8 |
| 36 | Sections: |
| 37 | - Section: .dynstr |
| 38 | - Section: .dynamic |
| 39 | - Type: PT_DYNAMIC |
| 40 | Flags: [ PF_X, PF_R ] |
| 41 | VAddr: 0x1024 |
| 42 | PAddr: 0x1024 |
| 43 | Sections: |
| 44 | |
| 45 | # CHECK: NeededLibs: |
| 46 | # CHECK-NEXT: - libfoo.so{{$}} |
| 47 | # CHECK-NEXT: - libbar.so{{$}} |
| 48 | # CHECK-NEXT: Symbols: {} |