Add --undefined-glob which is an --undefined with wildcard pattern match
This patch adds new command line option `--undefined-glob` to lld. That option is a variant of `--undefined` but accepts wildcard patterns so that all symbols that match with a given pattern are handled as if they were given by `-u`. `-u foo` is to force resolve symbol foo if foo is not a defined symbol and there's a static archive that contains a definition of symbol foo. Now, you can specify a wildcard pattern as an argument for `--undefined-glob`. So, if you want to include all JNI symbols (which start with "Java_"), you can do that by passing `--undefined-glob "Java_*"` to the linker, for example. In this patch, I use the same glob pattern matcher as the version script processor is using, so it does not only support `*` but also `?` and `[...]`. Differential Revision: https://reviews.llvm.org/D63244 llvm-svn: 363396
Loading
Please register or sign in to comment