[ELF] Replace error() with errorOrWarn() for the ASSERT command
authorFangrui Song <maskray@google.com>
Fri, 6 Sep 2019 16:30:22 +0000 (16:30 +0000)
committerFangrui Song <maskray@google.com>
Fri, 6 Sep 2019 16:30:22 +0000 (16:30 +0000)
commit2682bc3c9d1ec7da324bedfa46fce537797b5a49
tree82b94ce1edc55c4e68ebbc4c256805baa88416ca
parent52614dfc7fd09d3de608068415eaa632c21c661d
[ELF] Replace error() with errorOrWarn() for the ASSERT command

Summary:
ld.bfd produces an output with --noinhibit-exec when an ASSERT fails.
Use errorOrWarn() so that we can produce an output as well.

An interesting case is that symbol assignments may execute multiple
times, so we probably want to suppress errors for non-final runs.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D67285

llvm-svn: 371225
lld/ELF/ScriptParser.cpp
lld/test/ELF/linkerscript/assert.s