On Thu, Mar 19, 2015 at 7:53 PM, Julius Werner jwerner@chromium.org wrote:
145a8a: 83 c3 14 add $0x14,%ebx
Okay, sorry, I didn't know you looked that closely into this. That's quite unrefuteable.
The only question that I still have is then WTF the compiler was thinking... this just sounds like a plain bug somewhere (but I agree that doesn't really help us much). We could still work around it with an explicit __attribute__((aligned, 4)) or __attribute__((packed)) if that works... I guess if the compiler does this for no apparent reason, then there's no real guarantee that a simple list of pointers won't also get screwed up like this?
Well... I was working the assumption an array of pointers couldn't possibly get hosed. That's about all I got for that. ;)
As for decorating the structures it's just sort of a pain in that you need to match alignment of the symbol in the linker script and the structure declaration -- for every object that we place like this in the linker scripts. Definitely doable though. Something to keep in one's back pocket.
-Aaron