definedBindingsInCoffArchive function
Returns the subset of candidateSymbols that the COFF archive defines.
Accounts for 32-bit x86 C symbol underscore prefixes (_symbol).
Implementation
Set<String> definedBindingsInCoffArchive(
Uint8List archive,
Iterable<String> candidateSymbols,
) {
final defined = parseCoffArchiveSymbols(archive);
return {
for (final symbol in candidateSymbols)
if (defined.contains(symbol) || defined.contains('_$symbol')) symbol,
};
}