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

[Question] How to remove symbols from symbol tables #36

Open
mjhouse opened this issue Jan 9, 2023 · 3 comments
Open

[Question] How to remove symbols from symbol tables #36

mjhouse opened this issue Jan 9, 2023 · 3 comments

Comments

@mjhouse
Copy link

mjhouse commented Jan 9, 2023

I'm working on a tool that uses egalito to remove target functions from compiled libraries. How can I modify the symbol tables? I can't find any examples of this in the codebase.

@mjhouse
Copy link
Author

mjhouse commented Jan 9, 2023

Also, with a very small test shared lib and a small test binary that uses that lib, I get a segfault at runtime if I've run the library through etharden, even with the --nop flag. I'm getting the same segfault in my own tool without modifying the ELF file- just parse and then generate.

Should I make an issue for this?

@mjhouse
Copy link
Author

mjhouse commented Jan 10, 2023

I made an issue for the segfault (#37)

@mikeggh
Copy link

mikeggh commented Mar 15, 2023

Check if your seeing "Warning: not populating PLT entries" error message with -v. I'm about to get into the same problem this evening. You can also verify if its the same thing by running: etelf ../src/ex/hello hello.test. Check gdb on both, disass main, and see whats going on with the "puts" function, and whether it leaves just an address (not plt resolving) on the modified version. If this is the same issue I'll post more information later.

Update:
I suggest you grab the artefact / virtual machine image for qemu/kvm (https://github.com/columbia/egalito-artefact/blob/master/README.txt) to do any tests you wish. I believe several parts of the code may need to be changed to work properly on the newest ubuntu. I haven't decided if I will continue with egalito as an approach considering it may take more time than alternatives to bring it up to speed for what I need. Good luck

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

No branches or pull requests

2 participants