37 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# RUN: echo "aliasto__text = __text; SECTIONS { .text 0x1000 : { __text = . ; *(.text) } }" > %t.script4# RUN: ld.lld -pie -o %t --script %t.script %t.o5# RUN: llvm-readobj --symbols %t | FileCheck %s6 7## Check that alias 'aliasto__text' has the correct value.8## (It should belong to the section .text and point to it's start).9 10# CHECK: Symbol {11# CHECK: Name: aliasto__text12# CHECK-NEXT: Value: 0x100013# CHECK-NEXT: Size: 014# CHECK-NEXT: Binding: Global15# CHECK-NEXT: Type: None16# CHECK-NEXT: Other: 017# CHECK-NEXT: Section: .text18# CHECK-NEXT: }19 20# CHECK: Symbol {21# CHECK: Name: __text22# CHECK-NEXT: Value: 0x100023# CHECK-NEXT: Size: 024# CHECK-NEXT: Binding: Global25# CHECK-NEXT: Type: None26# CHECK-NEXT: Other: 027# CHECK-NEXT: Section: .text28# CHECK-NEXT: }29 30.text31.globl _start32.type _start, %function33_start:34.globl aliasto__text35 call __text36 call aliasto__text37