Skip to content
Commit c1522816 authored by George Rimar's avatar George Rimar
Browse files

[LLD][ELF] - Do not crash when parsing the -defsym option from a error state.

When we are in a error state, script parser will not parse the -defsym
expression and hence will not tokenize it. Then ScriptLexer::Pos will be 0
and LLD will assert and crash here:

MemoryBufferRef ScriptLexer::getCurrentMB() {
  assert(!MBs.empty() && Pos > 0); // Bang !

Solution - stop parsing the defsym in a error state. That is consistent
with the regular case (when we parse the linker script).

llvm-svn: 347549
parent 4fac50e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment