# Check that defined symbols are present in the generated executable # RUN: yaml2obj -format=elf %s > %t-o.o # RUN: lld -flavor old-gnu -target arm-linux-gnu --defsym=main=fn \ # RUN: -Bstatic --noinhibit-exec %t-o.o -o %t # RUN: llvm-readobj -symbols %t | FileCheck %s # CHECK: Name: main (1) # CHECK-NEXT: Value: 0x400074 # CHECK-NEXT: Size: 0 # CHECK-NEXT: Binding: Global (0x1) # CHECK-NEXT: Type: Function (0x2) # CHECK-NEXT: Other: 0 # CHECK-NEXT: Section: .text (0x1) # CHECK: Name: fn (6) # CHECK-NEXT: Value: 0x400074 # CHECK-NEXT: Size: {{[0-9]+}} # CHECK-NEXT: Binding: Global (0x1) # CHECK-NEXT: Type: Function (0x2) # CHECK-NEXT: Other: 0 # CHECK-NEXT: Section: .text (0x1) --- FileHeader: Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_REL Machine: EM_ARM Flags: [ EF_ARM_EABI_VER5 ] Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] AddressAlign: 0x0000000000000004 Content: 04B02DE500B08DE20030A0E30300A0E100D04BE204B09DE41EFF2FE1 - Name: .data Type: SHT_PROGBITS Flags: [ SHF_WRITE, SHF_ALLOC ] AddressAlign: 0x0000000000000001 Content: '' - Name: .bss Type: SHT_NOBITS Flags: [ SHF_WRITE, SHF_ALLOC ] AddressAlign: 0x0000000000000001 Symbols: Global: - Name: fn Type: STT_FUNC Section: .text ...