1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o 3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/resolution-end.s -o %t2.o 4# RUN: ld.lld -shared -soname=so -o %t2.so %t2.o 5# RUN: ld.lld %t1.o %t2.so -o %t 6# RUN: llvm-readobj --symbols -S --section-data %t | FileCheck %s 7 8# Test that we resolve _end to the this executable. 9 10# CHECK: Name: .text 11# CHECK-NEXT: Type: SHT_PROGBITS 12# CHECK-NEXT: Flags [ 13# CHECK-NEXT: SHF_ALLOC 14# CHECK-NEXT: SHF_EXECINSTR 15# CHECK-NEXT: ] 16# CHECK-NEXT: Address: 17# CHECK-NEXT: Offset: 18# CHECK-NEXT: Size: 19# CHECK-NEXT: Link: 20# CHECK-NEXT: Info: 21# CHECK-NEXT: AddressAlignment: 22# CHECK-NEXT: EntrySize: 23# CHECK-NEXT: SectionData ( 24# CHECK-NEXT: 0000: 08232000 00000000 08232000 00000000 25# CHECK-NEXT: ) 26 27# CHECK: Symbol { 28# CHECK: Name: _end 29# CHECK-NEXT: Value: 0x202308 30 31# CHECK: Symbol { 32# CHECK: Name: end 33# CHECK-NEXT: Value: 0x202308 34 35.global _start 36_start: 37.quad _end 38.quad end 39