[all-commits] [llvm/llvm-project] 06c4aa: [lld-macho] implement options -(un)exported_symbol...

Greg McGary via All-commits all-commits at lists.llvm.org
Tue Mar 9 18:47:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 06c4aadeb654f2430f4d8a7cf789330e0d583360
      https://github.com/llvm/llvm-project/commit/06c4aadeb654f2430f4d8a7cf789330e0d583360
  Author: Greg McGary <gkm at fb.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/Options.td
    M lld/MachO/SyntheticSections.cpp
    A lld/test/MachO/export-options.s

  Log Message:
  -----------
  [lld-macho] implement options -(un)exported_symbol(s_list)

Implement command-line options to alter a dylib's exported-symbols list:
* `-exported_symbol*` options override the default export list. The export list is compiled according to the command-line option(s) only.
* `-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.

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




More information about the All-commits mailing list