binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Automatically show functions in the __mod_init_func section and name them as such in MACH-O binaries

Open shepgoba opened this issue 3 years ago • 0 comments

Init funcs in MACH-O binaries are not named after being an init func or shown in the __mod_init_func section, as shown in the screenshots below. image image

It would be nice if these were shown in the __mod_init_func section which could be jumped to, as well as being named similar to how they are in IDA. IDA names init funcs InitFunc_<index> so the first one is InitFunc_0, then InitFunc_1, then InitFunc_2, etc.

It seems like that would make sense because sub_<address> is a name that's understandably based on no information, so IMO we may as well populate function names with something that make sense. It doesn't need to copy IDA's naming scheme, although InitFunc does make the most sense.

What's interesting is when I load a shared library like one shown in those screenshots it jumps to sub_9b14, pointing to the fact that your analyzer knows what the constructors / init funcs are.

Regardless, thanks for your effort

shepgoba avatar Jul 28 '22 03:07 shepgoba