Caleb James DeLisle on Nostr: Hah, you don't even need to change the calling convention. Using 64 bit words for ...
Hah, you don't even need to change the calling convention. Using 64 bit words for calling is fine, even if you're pushing them to the stack, just take it.
What's needed is bit in the process structure that tells the kernel never to give the process a pointer bigger than 32 bits. Then a tag in the ELF that tells the dynamic linker to set that bit on load, and to refuse linking a tagged lib to an untagged (normal 64 bit) executable, the other way around is fine.
Then a bunch of #pragma ptrsz in all of the header files so that structures which need to be passed around will have the right shape.
What's needed is bit in the process structure that tells the kernel never to give the process a pointer bigger than 32 bits. Then a tag in the ELF that tells the dynamic linker to set that bit on load, and to refuse linking a tagged lib to an untagged (normal 64 bit) executable, the other way around is fine.
Then a bunch of #pragma ptrsz in all of the header files so that structures which need to be passed around will have the right shape.