News for hackers. Stuff that matters.
Re:The smallest Hello World program by bd01 on Thursday January 02, 2025 @04:48PM (#42579315)
Initial register state is documented to be undefined except for rbp, rsp and rdx [1].

Can you say for certain that no other Linux version ever used GPRs to pass something else?

[1] System V ABI, page 29 (last line) and 30, https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf

Re:The smallest Hello World program by rep_lodsb on Thursday January 02, 2025 @05:01PM (#42579409)
For certain? No, but I wouldn't expect it. Not sure what that function pointer in rdx is intended for, but Linux doesn't use it.

(Note for pedants: rsp is technically a "general purpose register", but of course it is initialized to point to the userspace stack instead of zero.)