PE sections handling rewrite - adding empty RSRC section #479

wants to merge 3 commits into


None yet
2 participants

Oldes commented May 19, 2013

Hi Doc, maybe it's not perfect, but with this change I can produce valid exe, which I can import into Resource Hacker and simply add icon to it. So far it's using just empty harcoded RSRC.

Why have you removed the - file-align part? This will probably result in wrong section pointers, unless you've found a bug?


Oldes replied May 20, 2013

Because I was getting invalid unexpected results with it. It was ok with the old version without rsrc section.

Why did you move entry-point-addr assignment out of build-opt-header?


Oldes replied May 20, 2013

Again, because it was producing inavlid result's with added rsrc section (one block more than expected)

Overall changes are fine to me, except for the two lines I've commented.


Oldes commented May 20, 2013

Feel free to improve it, you are more familiar with these functions. I'm always checking the result by reverse engineering and this was producing expected result. Btw, I started implementation of more advanced rsrc section, not just empty placeholder. It's true that it's complex stuff, but quite doable. But will have to find some free time on that.


Oldes commented on 2f46f61 May 20, 2013

This is may not completely correct yet, as I cannot see the icon's entry in "XN Resource Editor", just Icon Group. But it looks correct in "Resource Hacker" tool, so hard to say now, what's the cause.

@Oldes Oldes closed this Nov 20, 2015

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