1# RUN: yaml2obj %s -o %t 2# RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s --check-prefix=ORIGINAL 3# RUN: llvm-elfabi --elf %t --emit-tbe=- --soname=libbest.so | FileCheck %s --check-prefix=REPLACED 4 5!ELF 6FileHeader: 7 Class: ELFCLASS64 8 Data: ELFDATA2LSB 9 Type: ET_DYN 10 Machine: EM_X86_64 11Sections: 12 - Name: .dynstr 13 Type: SHT_STRTAB 14 Flags: [ SHF_ALLOC ] 15 Address: 0x1000 16# \0 b a z\0 s o m e l i b . s o\0 f o o\0 17 Content: "0062617a00736f6d656c69622e736f00666f6f00" 18 - Name: .dynamic 19 Type: SHT_DYNAMIC 20 Flags: [ SHF_ALLOC ] 21 Address: 0x0000000000001018 22 Link: .dynstr 23 AddressAlign: 0x0000000000000008 24 EntSize: 0x0000000000000010 25 Entries: 26 - Tag: DT_SONAME 27 Value: 0x0000000000000005 28 - Tag: DT_STRSZ 29 Value: 0x0000000000000014 30 - Tag: DT_STRTAB 31 Value: 0x0000000000001000 32 - Tag: DT_SYMTAB 33 Value: 0x0000000000001000 34 - Tag: DT_NULL 35 Value: 0x0000000000000000 36ProgramHeaders: 37 - Type: PT_LOAD 38 Flags: [ PF_R ] 39 VAddr: 0x1000 40 Align: 8 41 FirstSec: .dynstr 42 LastSec: .dynamic 43 - Type: PT_DYNAMIC 44 Flags: [ PF_X, PF_R ] 45 VAddr: 0x1018 46 FirstSec: .dynamic 47 LastSec: .dynamic 48 49# ORIGINAL: SoName: somelib.so{{$}} 50 51# REPLACED: SoName: libbest.so{{$}} 52