You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
eng
libcxx
benchmarks
cmake
docs
fuzzing
include
lib
src
utils
google-benchmark
libcxx
symcheck-blacklists
cat_files.py
gen_link_script.py
merge_archives.py
not.py
sym_diff.py
sym_extract.py
sym_match.py
www
.arcconfig
.clang-format
.gitignore
CMakeLists.txt
CREDITS.TXT
LICENSE.TXT
NOTES.TXT
TODO.TXT
appveyor-reqs-install.cmd
appveyor.yml
libcxxabi
libunwind
lld
lldb
llvm
nuget
openmp
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
43 lines
1.7 KiB
Python
43 lines
1.7 KiB
Python
![]() |
#!/usr/bin/env python
|
||
|
#===----------------------------------------------------------------------===##
|
||
|
#
|
||
|
# The LLVM Compiler Infrastructure
|
||
|
#
|
||
|
# This file is dual licensed under the MIT and the University of Illinois Open
|
||
|
# Source Licenses. See LICENSE.TXT for details.
|
||
|
#
|
||
|
#===----------------------------------------------------------------------===##
|
||
|
"""
|
||
|
sym_extract - Extract and output a list of symbols from a shared library.
|
||
|
"""
|
||
|
from argparse import ArgumentParser
|
||
|
from libcxx.sym_check import extract, util
|
||
|
|
||
|
|
||
|
def main():
|
||
|
parser = ArgumentParser(
|
||
|
description='Extract a list of symbols from a shared library.')
|
||
|
parser.add_argument('library', metavar='shared-lib', type=str,
|
||
|
help='The library to extract symbols from')
|
||
|
parser.add_argument('-o', '--output', dest='output',
|
||
|
help='The output file. stdout is used if not given',
|
||
|
type=str, action='store', default=None)
|
||
|
parser.add_argument('--names-only', dest='names_only',
|
||
|
help='Output only the name of the symbol',
|
||
|
action='store_true', default=False)
|
||
|
parser.add_argument('--only-stdlib-symbols', dest='only_stdlib',
|
||
|
help="Filter all symbols not related to the stdlib",
|
||
|
action='store_true', default=False)
|
||
|
args = parser.parse_args()
|
||
|
if args.output is not None:
|
||
|
print('Extracting symbols from %s to %s.'
|
||
|
% (args.library, args.output))
|
||
|
syms = extract.extract_symbols(args.library)
|
||
|
if args.only_stdlib:
|
||
|
syms, other_syms = util.filter_stdlib_symbols(syms)
|
||
|
util.write_syms(syms, out=args.output, names_only=args.names_only)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|