1# RUN: yaml2obj %s -o %t 2# RUN: llvm-nm --no-sort %t | FileCheck %s 3 4## We used to be wrong with some linker synthesized symbols. 5 6## We mark __init_array_start as 'd', as consistent with GNU nm >= 2.33 (older GNU 7## nm marks it as 't'). See https://sourceware.org/bugzilla/show_bug.cgi?id=24511 8 9# CHECK: d __fini_array_start 10# CHECK: d __init_array_start 11# CHECK: d __preinit_array_start 12# CHECK: B __bss_start 13# CHECK: D _edata 14# CHECK: B _end 15 16!ELF 17FileHeader: 18 Class: ELFCLASS64 19 Data: ELFDATA2LSB 20 Type: ET_EXEC 21 Machine: EM_X86_64 22Sections: 23 - Name: .text 24 Type: SHT_PROGBITS 25 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 26 - Name: .fini_array 27 Type: SHT_FINI_ARRAY 28 Flags: [ SHF_ALLOC, SHF_WRITE ] 29 - Name: .init_array 30 Type: SHT_INIT_ARRAY 31 Flags: [ SHF_ALLOC, SHF_WRITE ] 32 - Name: .preinit_array 33 Type: SHT_PREINIT_ARRAY 34 Flags: [ SHF_ALLOC, SHF_WRITE ] 35 - Name: .data 36 Type: SHT_PROGBITS 37 Flags: [ SHF_ALLOC, SHF_WRITE ] 38 - Name: .bss 39 Type: SHT_NOBITS 40 Flags: [ SHF_ALLOC, SHF_WRITE ] 41Symbols: 42 - Name: __fini_array_start 43 Section: .fini_array 44 - Name: __init_array_start 45 Section: .init_array 46 - Name: __preinit_array_start 47 Section: .preinit_array 48 49 - Name: __bss_start 50 Section: .bss 51 Binding: STB_GLOBAL 52 - Name: _edata 53 Section: .data 54 Binding: STB_GLOBAL 55 - Name: _end 56 Section: .bss 57 Binding: STB_GLOBAL 58