diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -329,7 +329,7 @@ void ScriptParser::readExtern() { expect("("); while (!errorCount() && !consume(")")) - Config->Undefined.push_back(next()); + Config->Undefined.push_back(unquote(next())); } void ScriptParser::readGroup() { diff --git a/lld/test/ELF/linkerscript/linkerscript.s b/lld/test/ELF/linkerscript/linkerscript.s --- a/lld/test/ELF/linkerscript/linkerscript.s +++ b/lld/test/ELF/linkerscript/linkerscript.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \ # RUN: %p/Inputs/libsearch-st.s -o %t2.o -# RUN: echo "EXTERN( undef undef2 )" > %t.script +# RUN: echo "EXTERN( undef undef2 \"undef3\" \"undef4@@other\")" > %t.script # RUN: ld.lld %t -o %t2 %t.script # RUN: llvm-readobj %t2 > /dev/null