ELF .note section to indicate Redox ABI
Created by: lunixbochs
There's currently no differentiation between Redox and Linux ELF binaries, so it's convoluted to automatically select the ABI when emulating a Redox binary in Usercorn (my best idea currently is to look for a Redox syscall symbol).
I propose adding an ELF .note
section like used in NetBSD ELFs, such as .note.redox.ident
. I'm not sure if this kind of ident is automatically picked up by file, but if it is the OS name and version are embedded. Here's an example NetBSD note as generated using an assembly file in my lib43 project: https://github.com/lunixbochs/lib43/blob/master/arch/x86_64/netbsd/note.s
If file won't recognize .note.redox.ident
automatically, the contents don't really matter to me. Maybe an ABI version 1.0 that can be manually incremented if anything is super changed around.