News for hackers. Stuff that matters.
Re:(Debugging Story) Inline Assembly Dangers by AshamedCaptain on Monday June 10, 2024 @09:13AM (#40633279)
You really should not use inline asm to write your _start routine. The compiler can (and someday WILL, when you least expect it) use the stack, maybe in the prelude, maybe because one day it decides it needs to preserve one of the regs you claim you are using. This is undefined behavior all over the place. There used to be some attributes like 'naked' in some old compilers to avoid this...

Also, no tests check if bss is zero? There's your problem... :)

There are no comments on this comment yet.