llvm-project/llvm/test/tools/llvm-objcopy
Jordan Rupprecht edeebad771 [llvm-objcopy] Add support for shell wildcards
Summary: GNU objcopy accepts the --wildcard flag to allow wildcard matching on symbol-related flags. (Note: it's implicitly true for section flags).

The basic syntax is to allow *, ?, \, and [] which work similarly to how they work in a shell. Additionally, starting a wildcard with ! causes that wildcard to prevent it from matching a flag.

Use an updated GlobPattern in libSupport to handle these patterns. It does not fully match the `fnmatch` used by GNU objcopy since named character classes (e.g. `[[:digit:]]`) are not supported, but this should support most existing use cases (mostly just `*` is what's used anyway).

Reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap

Reviewed By: MaskRay

Subscribers: nickdesaulniers, emaste, arichardson, hiraditya, jakehehrlich, abrachet, seiya, llvm-commits

Tags: #llvm

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

llvm-svn: 375169
2019-10-17 20:51:00 +00:00
..
COFF [llvm-objcopy] Improve --add-section argument string parsing 2019-07-29 16:22:40 +00:00
ELF [llvm-objcopy] Add support for shell wildcards 2019-10-17 20:51:00 +00:00
Inputs [llvm-objcopy] [COFF] Fix handling of aux symbols for big objects 2019-01-23 11:54:51 +00:00
MachO Recommit "[llvm-objcopy][MachO] Implement a layout algorithm for executables" 2019-08-19 21:12:02 +00:00