-
Notifications
You must be signed in to change notification settings - Fork 57
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
repr(C) is necessary #28
Comments
Some discussion about the alignment of Most important bit:
|
In general, I agree that we should replace all instances of |
If it turns out that the structure layout is really what GRUB2 gives us currently (note that the layout as specified in the Multiboot specification doesn't have this issue), then I'd strongly suggest we just ignore the |
Is it possible that grub actually gives the info in u32 fields even for ELF64? I can't check it right now. |
As most of all the |
I see a few structs that are still |
Pull request is ready to be merged. I'm going to close this. Reopen if necessary. |
Currently, several structures use
#[repr(packed)]
. This works merely by coincidence, sincepacked
is just a modifier, not a standalone representation (equivalent to#[repr(rust, packed)]
). Correct annotation should be#[repr(C, packed)]
.Even better would be to fix the padding by fixing structure fields, since
packed
exists to allow misaligned field accesses (i.e. special code in place of every load and store), which is totally unnecessary for aligned multiboot data.The text was updated successfully, but these errors were encountered: