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

Cleanup code #31

Open
aquynh opened this issue May 6, 2016 · 2 comments
Open

Cleanup code #31

aquynh opened this issue May 6, 2016 · 2 comments

Comments

@aquynh
Copy link
Member

aquynh commented May 6, 2016

At the moment there are still quite a lot of redundant code that we can trim away. Feel free to comment on this issue when you find things that can be deleted.

@iksteen
Copy link
Contributor

iksteen commented May 22, 2016

I've been looking into this, there are a couple of relatively easy targets (eg. MachO and COFF writers which are irrelevant because keystone only uses a patched up version of the ELF writer which in turn makes all code dealing with the ObjectFormat part of Triple redundant).

There are also some harder targets such as debug info generation (DWARF/CodeView output and code dealing with call frame information and exception handling code) that's pretty much weaved into the rest of the code. Removing those would mean quite a few directives stop working which never made sense in the context of keystone in the first place (things like .loc).

Having all that out of the way opens paths for further code reduction such as the file handling (unless you want to maintain compatibility with the .include directive), getting rid of ELF section management (since keystone only cares about .text anyway.

I started doing some of this work in a branch: https://github.com/iksteen/keystone-beta/commits/clean-unused maybe you could have a look at it?

@aquynh
Copy link
Member Author

aquynh commented May 23, 2016

i think your "easy targets" can be considered first. could you make a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants