[PATCH] D27831: [ELF] - Linkerscript: Fall back to search paths when INCLUDE not found

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 15:39:22 PST 2016


ruiu added a comment.

Just curious, are you actually using `INLCUDE`? If so, what application? (I was looking for a real usage of `INCLUDE` command.)



================
Comment at: ELF/LinkerScript.cpp:1187-1188
 void ScriptParser::readInclude() {
   StringRef Tok = next();
-  auto MBOrErr = MemoryBuffer::getFile(unquote(Tok));
+  auto Unquoted = unquote(Tok);
+  // https://sourceware.org/binutils/docs/ld/File-Commands.html:
----------------
Can this be

  StringRef Tok = unquote(next());

?


================
Comment at: ELF/LinkerScript.cpp:1193
+  auto MBOrErr = MemoryBuffer::getFile(Unquoted);
+  if (!MBOrErr) {
+    if (auto Path = findFromSearchPaths(Unquoted))
----------------
Remove `{}`.


Repository:
  rL LLVM

https://reviews.llvm.org/D27831





More information about the llvm-commits mailing list