Maybe also specifying the shared libc would be nice, VERSION 1 FORMAT doesn't seem to allow that
I'd like to suggest that as part of the embedded record header, it would be nice to also be able to specify the shared libc used. VERSION 1 FORMAT doesn't seem to allow that right now. This could be achieved by following the initial 16bit int and padded two bytes by for example an int indicating the libc .so file name length, and then the actual .so file name, preceding still the actual embedded ELF binary. Alternately, the spec could be changed such that having two identical records is allowed if they both link a different shared libc, although it would then be considerably harder for the OS loader to figure out which one to pick. This would be very useful to cover scenarios like Alpine Linux where one would likely want to build for shared musl libc, vs mainstream Linux distros where one would likely want to build for shared glibc.
(To my understanding, static musl libc is unusable in most cases for graphical applications and therefore not really an alternate solution here. Also, from what I've gathered the only musl libc compatibility layer that exists for running shared glibc binaries without setting up an entire container environment like flatpak or docker seems to be pretty hacky. Like, in a way where it introduces additional race conditions and attack vectors for the programs run, so not really what one would want to rely on instead. Don't quote me on that though, only what my impression of it was.)