• Home
  • Raw
  • Download

Lines Matching full:symbols

3 """A tool for extracting a list of symbols to export
5 When exporting symbols from a dll or exe we either need to mark the symbols in
6 the source code as __declspec(dllexport) or supply a list of symbols to the
8 list of link inputs and deciding which of those symbols need to be exported.
10 We can't just export all the defined symbols, as there's a limit of 65535
11 exported symbols and in clang we go way over that, particularly in a debug
12 build. Therefore a large part of the work is pruning symbols either which can't
15 importing these symbols anyway.
26 # Define functions which extract a list of symbols from a library using several
33 process = subprocess.Popen(['dumpbin','/symbols',lib], bufsize=1,
38 # Look for external symbols that are defined in some section
50 # Look for external symbols that are defined in some section
57 process = subprocess.Popen(['llvm-readobj','-symbols',lib], bufsize=1,
120 # identifier/type mangling we can decide which symbols could possibly be
149 # Keep mangled llvm:: and clang:: function symbols. How we detect these is a
172 # demangle the identifier mangling to identify symbols that can be safely
176 # see on all symbols, even mangled C++ symbols)
314 symbols = dict()
318 symbols[symbol] = 1 + symbols.setdefault(symbol,0)
319 return symbols
324 description='Extract symbols to export from libraries')
328 help='tools to use to extract symbols and determine the'
331 help='libraries to extract symbols from')
335 # Determine the function to use to get the list of symbols from the inputs,
372 print("Couldn't find a program to read symbols with", file=sys.stderr)
378 # How we determine which symbols to keep and which to discard depends on
385 # Get the list of libraries to extract symbols from
409 # Extract symbols from libraries in parallel. This is a huge time saver when
410 # doing a debug build, as there are hundreds of thousands of symbols in each
432 symbols = dict() variable
435 symbols[k] = v + symbols.setdefault(k,0)
444 for k in symbols:
483 # Print symbols which both:
484 # * Appear in exactly one input, as symbols defined in multiple
493 for k,v in list(symbols.items()):