# Check that _GLOBAL_OFFSET_TABLE_ symbol is resolved # RUN: yaml2obj -format=elf -docnum 1 %s > %t-got.o # RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \ # RUN: --noinhibit-exec %t-got.o -o %t # RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=GOT %s # GOT: Name: _GLOBAL_OFFSET_TABLE_ (183) # GOT-NEXT: Value: {{[0-9]+}} # GOT-NEXT: Size: 0 # GOT-NEXT: Binding: Global (0x1) # GOT-NEXT: Type: Object (0x1) # GOT-NEXT: Other: 0 # GOT-NEXT: Section: Absolute (0xFFF1) # Check that __exidx_start/_end symbols are resolved # RUN: yaml2obj -format=elf -docnum 2 %s > %t-exidx.o # RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \ # RUN: --defsym=main=fn --noinhibit-exec %t-exidx.o -o %t # RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=EXIDX %s # EXIDX: Name: __exidx_start (186) # EXIDX-NEXT: Value: {{[0-9]+}} # EXIDX-NEXT: Size: 0 # EXIDX-NEXT: Binding: Global (0x1) # EXIDX-NEXT: Type: Object (0x1) # EXIDX-NEXT: Other: 0 # EXIDX-NEXT: Section: Absolute (0xFFF1) # # EXIDX: Name: __exidx_end (200) # EXIDX-NEXT: Value: {{[0-9]+}} # EXIDX-NEXT: Size: 0 # EXIDX-NEXT: Binding: Global (0x1) # EXIDX-NEXT: Type: Object (0x1) # EXIDX-NEXT: Other: 0 # EXIDX-NEXT: Section: Absolute (0xFFF1) # Check that all symbols are resolved # RUN: yaml2obj -format=elf -docnum 1 %s > %t-got.o # RUN: yaml2obj -format=elf -docnum 2 %s > %t-exidx.o # RUN: lld -flavor gnu -target arm -m armelf_linux_eabi -Bstatic \ # RUN: --noinhibit-exec %t-got.o %t-exidx.o -o %t # RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=SYMS %s # SYMS: Name: _GLOBAL_OFFSET_TABLE_ (186) # SYMS-NEXT: Value: {{[0-9]+}} # SYMS-NEXT: Size: 0 # SYMS-NEXT: Binding: Global (0x1) # SYMS-NEXT: Type: Object (0x1) # SYMS-NEXT: Other: 0 # SYMS-NEXT: Section: Absolute (0xFFF1) # # SYMS: Name: __exidx_start (208) # SYMS-NEXT: Value: {{[0-9]+}} # SYMS-NEXT: Size: 0 # SYMS-NEXT: Binding: Global (0x1) # SYMS-NEXT: Type: Object (0x1) # SYMS-NEXT: Other: 0 # SYMS-NEXT: Section: Absolute (0xFFF1) # # SYMS: Name: __exidx_end (222) # SYMS-NEXT: Value: {{[0-9]+}} # SYMS-NEXT: Size: 0 # SYMS-NEXT: Binding: Global (0x1) # SYMS-NEXT: Type: Object (0x1) # SYMS-NEXT: Other: 0 # SYMS-NEXT: Section: Absolute (0xFFF1) # got.o --- 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: 80B483B000AF40F20003C0F200037B60002318460C37BD465DF8047B704700BF - 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: main Type: STT_FUNC Section: .text Value: 0x0000000000000001 - Name: _GLOBAL_OFFSET_TABLE_ # exidx.o --- 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: 80B483B000AF40F20003C0F200037B60002318460C37BD465DF8047B704700BF - 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 Value: 0x0000000000000001 - Name: __exidx_start - Name: __exidx_end ...