-
Notifications
You must be signed in to change notification settings - Fork 145
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
Fix writing of aligned empty sections #540
Conversation
This was previously causing an assertion failure because the alignment padding was not written to the buffer if the section was empty, which caused subsequent sections to be placed at the wrong offsets.
26bf2ab
to
0d6c1b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this was broken by #514.
I think originally these zero length checks were meant to skip writing alignment for .bss sections, but it looks like both gcc and clang write this alignment, so LGTM.
I don't think this was broken by #514, it seems to be a separate issue. I only noticed because the |
The test you added worked before #514. |
Ah right I see it now. Yes this fixes the bug introduced by #514, while still keeping the new behavior of properly aligning empty sections. |
Ping! Could this be merged and included in a release? It's currently breaking my code. |
Yep, I'll get a release done this week. |
Released in 0.31.1 |
This was previously causing an assertion failure because the alignment padding was not written to the buffer if the section was empty, which caused subsequent sections to be placed at the wrong offsets.
This was previously causing an assertion failure because the alignment padding was not written to the buffer if the section was empty, which caused subsequent sections to be placed at the wrong offsets.