Files
clang-p2996/lld/test/ELF/linkerscript/expr-invalid-sec.s
George Rimar 41c7ab4a3d [ELF] - Linkerscript: improved error reporting.
When linking linux kernel LLD currently reports next errors:

ld: error: unable to evaluate expression: input section .head.text has no output section assigned
ld: error: At least one side of the expression must be absolute
ld: error: At least one side of the expression must be absolute

That does not provide file/line information and overall looks unclear. 
Patch adds location information to ExprValue and that allows
to provide more clear error messages.

Differential revision: https://reviews.llvm.org/D33943

llvm-svn: 304881
2017-06-07 08:54:43 +00:00

7 lines
324 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: echo "SECTIONS { foo = ADDR(.text) + ADDR(.text); };" > %t.script
# RUN: not ld.lld -o %t.so --script %t.script %t.o -shared 2>&1 | FileCheck %s
# CHECK: error: {{.*}}.script:1: at least one side of the expression must be absolute