zig/deps/lld/test/ELF/linkerscript/early-assign-symbol.s
Andrew Kelley 4794281d64 embed LLD 5.0.0
This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the
git monorepo.
2017-08-27 17:46:59 -04:00

15 lines
557 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: echo "SECTIONS { aaa = 1 + ABSOLUTE(foo - 1); .text : { *(.text*) } }" > %t1.script
# RUN: not ld.lld -o %t --script %t1.script %t.o 2>&1 | FileCheck %s
# RUN: echo "SECTIONS { aaa = ABSOLUTE(foo - 1) + 1; .text : { *(.text*) } }" > %t2.script
# RUN: not ld.lld -o %t --script %t2.script %t.o 2>&1 | FileCheck %s
# CHECK: error: {{.*}}.script:1: unable to evaluate expression: input section .text has no output section assigned
.section .text
.globl foo
foo: