it's always extremely cursed when 0 is valid addressable memory so faults get triggered 2 functions later when the garbage that was fetched from 0 actually blows stuff up
actually @sys64738 pls help
whymst the fuck does a static firmware binary with a custom linker script end up with .got
@haskal extremely global offset table
@haskal It's more cursed Historically. On a VAX running 4.3BSD, address 0 always stores the number 0, no segfault, no bus error. A bad program may intentionally rely on this "feature" - who needs to check for NULL pointers when you get a default value for free... 🙈
@niconiconi @haskal Oh wow, is that K&R argument "prototypes"?
@grainloom @haskal Yes. Need to wait three more years for ANSI C, you can't even use "void *" at this point.
@niconiconi @haskal Why does int b = NULL; make &b == NULL? Surely it'd just make b = 0?
@wizzwizz4 @haskal I need to redo this example with the typo fixed.
extremely cursed when your static firmware binary has a got in it