summaryrefslogtreecommitdiff
path: root/utils/sym_check/sym_extract.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/sym_check/sym_extract.py')
-rwxr-xr-xutils/sym_check/sym_extract.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/sym_check/sym_extract.py b/utils/sym_check/sym_extract.py
index a0fbb3e63..27765679e 100755
--- a/utils/sym_check/sym_extract.py
+++ b/utils/sym_check/sym_extract.py
@@ -25,11 +25,16 @@ def main():
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)