Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to exclude common helper functions #469

Open
rfalke opened this issue Aug 8, 2017 · 4 comments
Open

Add option to exclude common helper functions #469

rfalke opened this issue Aug 8, 2017 · 4 comments
Labels
enhancement This is a feature request

Comments

@rfalke
Copy link

rfalke commented Aug 8, 2017

Reko outputs helper functions from the compiler, libc and others. These helper functions make it harder to understand the source code. A command line option should be added to exclude such helper functions at least for the output. Maybe also for the decompilation. The not complete list used by holdec is:

                "__do_global_ctors_aux",
                "__do_global_dtors_aux",
                "__libc_init",
                "__setfpucw",
                "__libc_csu_init",
                "__libc_csu_fini",
                "__libc_start_main",
                "__fpstart",
                "__register_frame_info",
                "__register_frame_info_table",
                "__deregister_frame_info",
                "__frame_state_for",

                "_fini",
                "_init",
                "_start",
                "_mcount",
                "_cleanup",

                "init_dummy",
                "fini_dummy",
                "call_gmon_start",
                "frame_init",
                "frame_dummy",
                "decode_uleb128",
                "decode_sleb128",
                "fde_insert",
                "count_fdes",
                "add_fdes",
                "find_fde",
                "extract_cie_info",
                "execute_cfa_insn"
@uxmal
Copy link
Owner

uxmal commented Aug 8, 2017

Seems like this is specific to ELF binaries? Perhaps the reko distribution should be augmented with a file containing names of symbols to be ignored in ELF files. You can today mark individual finctions as "no-decompile" in reko, but obviously there is value in not having to do this manually for procedures that occur frequently. How does holdec manage this list? Is it hard-coded or kept in a file?

@uxmal uxmal added the enhancement This is a feature request label Aug 8, 2017
@rfalke
Copy link
Author

rfalke commented Aug 8, 2017

For holdec it is hardcoded for every format (ELF, PE, LE, ...) but only ELF defines a non-empty list. Mostly because I concentrated on ELF so far.

I think you could also see these helper functions if you compile with gcc on windows. It depends more on the compiler, libc and other frameworks used.

@rfalke
Copy link
Author

rfalke commented Jan 10, 2018

What about adding a command line option so that the user can decide if you do not want to encode the function list in reko?!

@rfalke
Copy link
Author

rfalke commented Sep 10, 2023

Is there any progress on this? Any way to exclude functions by name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is a feature request
Projects
None yet
Development

No branches or pull requests

2 participants