[PATCH] D98223: [lld-macho] implement options -(un)exported_symbol(s_list)

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 16:44:40 PST 2021


gkm created this revision.
gkm added a reviewer: lld-macho.
Herald added a subscriber: dang.
Herald added a reviewer: int3.
Herald added a project: lld-macho.
gkm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Implement command-line options to alter a dylib's exported-symbols list:

- `-exported_symbol*` options export otherwise private symbols
- `-unexported_symbol*` options hide otherwise public symbols
- `-*exported_symbol PATTERN` options specify a single literal or glob pattern
- `-*exported_symbols_list FILE` options specify a file containing a series of lines containing symbol literals or glob patterns. Whitespace and `#`-prefix comments are stripped.

Note: This is a simple implementation of the primary use case. ld64 has much more complexity surrounding interactions with other options, many of which are obscure and undocumented. We will start simple and complexity as necessary.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98223

Files:
  lld/MachO/Config.h
  lld/MachO/Driver.cpp
  lld/MachO/Options.td
  lld/MachO/SyntheticSections.cpp
  lld/test/MachO/export-options.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98223.329162.patch
Type: text/x-patch
Size: 10133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210309/5de844ad/attachment.bin>


More information about the llvm-commits mailing list