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
parseThat not outputting executable binary (Exec format error) #71
Comments
@wrwilliams or @cuviper do you see anything wrong with the header? Here is a gist of the full https://gist.github.com/jdetter/8b2268edf4a61190848b358863ae12cd |
Looks like the interp adjustments are still not right. The section header shifted by a page size without changing for the extra phdr, and the program headers also got a bad page size update.
|
Would you have time to try to fix this? You have a much better idea of what's going on. |
I'll give it a shot. |
Mohamed is looking for an update on this, I told him were all busy looking at the test4_2 issue but after that someone will have time to look at this. |
Yes, sorry about that, the runtime hangs were more pressing to me. I think we've got a handle on that though, so I'll get back to this one. I'm going to see if I can simplify this logic to just "interp goes directly after phdrs, no matter what." |
When .interp was in the first page, keep it there like the comment about FreeBSD requires. Just shift it for the new PHDR. But if .interp is already past the first page, as seen in libc.so for instance, then move its offset a whole page like we do for every other section. Then program headers follow the same logic. The conditional around startMovingSections and object type is totally removed, as it did the wrong thing for PIE binaries which otherwise look like shared libraries. We now just move all sections except low interp. Fixes dyninst#71.
When .interp was in the first page, keep it there like the comment about FreeBSD requires. Just shift it for the new PHDR. But if .interp is already past the first page, as seen in libc.so for instance, then move its offset a whole page like we do for every other section. Then program headers follow the same logic. The conditional around startMovingSections and object type is totally removed, as it did the wrong thing for PIE binaries which otherwise look like shared libraries. We now just move all sections except low interp. Fixes #71.
Mohamed is having an issue where he runs:
and the output binary
ssh-dyn
will not execute due to an exec format error. The header information looks correct to me so I'm not sure why exec won't take it:Ubuntu's version of
/usr/bin/ssh
can be found hereThe
ssh-dyn
binary generated by parseThat can be found hereThe text was updated successfully, but these errors were encountered: