Skip to content

Commit

Permalink
gumjs: Ignore tcclib.h symbols when generating runtime (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu authored Feb 16, 2023
1 parent 065fb33 commit e00cb42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bindings/gumjs/generate-runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,14 @@ def transform_capstone_include(m):

return "typedef int cs_{0};".format(name)

def libtcc_is_header(name):
"""Ignore symbols from the TinyCC standard library: dlclose() etc."""
return is_header(name) and name != "tcclib.h"

inputs = [
(input_dir / "runtime" / "cmodule", None, is_header, identity_transform, 'GUM_CHEADER_FRIDA'),
(input_dir / "runtime" / "cmodule-tcc", None, is_header, identity_transform, 'GUM_CHEADER_TCC'),
(libtcc_incdir, None, is_header, identity_transform, 'GUM_CHEADER_TCC'),
(libtcc_incdir, None, libtcc_is_header, identity_transform, 'GUM_CHEADER_TCC'),
(gum_dir / ("arch-" + writer_arch), gum_dir.parent, gum_header_matches_writer, optimize_gum_header, 'GUM_CHEADER_FRIDA'),
(capstone_incdir, None, capstone_header_matches_arch, optimize_capstone_header, 'GUM_CHEADER_FRIDA'),
]
Expand Down

0 comments on commit e00cb42

Please sign in to comment.