49 lines · yaml
1# Test handling of object files that have duplicate sections. This is legal,2# according to the System V ABI (Edition 4.1); see 4-20 where it says:3#4# Section names with a dot (.) prefix are reserved for the system,5# although applications may use these sections if their existing6# meanings are satisfactory. ... **An object file may have more than7# one section with the same name.**8#9# (See https://github.com/llvm/llvm-project/issues/88001)10 11# RUN: yaml2obj %s -o %t12# RUN: lldb-test symbols %t | FileCheck %s13 14# CHECK: 0x0000000000400010 {{.*}} my_function15# CHECK: 0x0000000000401020 {{.*}} my_other_function16 17!ELF18FileHeader:19 Class: ELFCLASS6420 Data: ELFDATA2LSB21 Type: ET_EXEC22 Machine: EM_X86_6423ProgramHeaders:24 - Type: PT_LOAD25 Flags: [ PF_X, PF_R ]26 FirstSec: .text27 LastSec: '.text (1)'28 VAddr: 0x40000029 Align: 0x100030 Offset: 0x031Sections:32 - Name: .text33 Type: SHT_PROGBITS34 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]35 Address: 0x40001036 AddressAlign: 0x1037 - Name: '.text (1)'38 Type: SHT_PROGBITS39 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GNU_RETAIN ]40 Address: 0x40100041 AddressAlign: 0x1042Symbols:43 - Name: my_function44 Section: .text45 Value: 0x40001046 - Name: my_other_function47 Section: '.text (1)'48 Value: 0x40102049