GRUB and protected mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
TheUnbeliever

Re:GRUB and protected mode

Post by TheUnbeliever »

I believe, although I may be wrong, that setting attribute packed means that any excess padding is removed, to allow for structures to be aligned as required by a specific protocol?
AR

Re:GRUB and protected mode

Post by AR »

__attribute__ sets an attribute, the __packed__/packed attribute removes padding between variables in a struct. It is only generally used for fulfilling specific interfaces like BIOS Data as unpacked (aligned) data improves performance.

There are also other attributes such as noreturn for functions that cause GCC to assume that the path of execution is going to terminate and not come back.
Post Reply