[PATCH] D72517: [lld/ELF] PR44498: Support input filename in double quote

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 09:13:49 PST 2020


thopre created this revision.
thopre added reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap.
Herald added subscribers: hiraditya, arichardson, emaste.
Herald added a project: LLVM.
thopre retitled this revision from "[lld/ELF] Support input filename in double quote" to "[lld/ELF] PR44498: Support input filename in double quote".

Linker scripts allow filenames to be put in double quotes to prevent
characters in filenames that are part of the linker script syntax from
having their special meaning. Case in point the * wildcard character.

Availability of double quoting filenames also allows to fix a failure in
ELF/linkerscript/filename-spec.s when the path contain a @ which the
lexer consider as a special characters and thus break up a filename
containing it.

To avoid the need for escaping GlobPattern metacharacters in filename
in double quotes, GlobPattern::create is augmented with a new parameter
to request literal matching instead of relying on the presence of a
wildcard character in the pattern.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72517

Files:
  lld/Common/Strings.cpp
  lld/ELF/LinkerScript.h
  lld/include/lld/Common/Strings.h
  lld/test/ELF/linkerscript/filename-spec.s
  llvm/include/llvm/Support/GlobPattern.h
  llvm/lib/Support/GlobPattern.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72517.237357.patch
Type: text/x-patch
Size: 4127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200110/23d5ce28/attachment.bin>


More information about the llvm-commits mailing list