1 # REQUIRES: x86, aarch64
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
3 # RUN: ld.lld -o %t.so --script %s %t.o -shared
4 # RUN: llvm-readobj --symbols %t.so | FileCheck %s
6 ## Test that the script creates a non absolute symbol with value
7 ## 0 I.E., a symbol that refers to the load address.
11 # CHECK-NEXT: Value: 0x0
13 # CHECK-NEXT: Binding: Global
14 # CHECK-NEXT: Type: None
15 # CHECK-NEXT: Other: 0
16 # CHECK-NEXT: Section: .text
19 ## Because of a bug we had a different behavior (different symbol 'foo' value)
20 ## on a platforms that might use thunks, like AArch64. Check that issue is fixed.
21 # RUN: llvm-mc -filetype=obj -triple=aarch64-linux-gnu /dev/null -o %t.o
22 # RUN: ld.lld -o %t.so --script %s %t.o -shared
23 # RUN: llvm-readobj --symbols %t.so | FileCheck %s
26 foo = ADDR(.text) - ABSOLUTE(ADDR(.text));