jacereda
jacereda
I guess I need some sleep now, but looks like the way to go is indeed loading libc ourselves.
> For example, it's been requested on more than a few occasions that Blinkenlights be able to run the dynamic executables that ship with Linux distros. Silly question, ld.so is...
Reported at https://github.com/jart/cosmopolitan/issues/331
I've attempted to port the musl loader, but it didn't go very far. I can invoke stdio functions from musl, but attempting to load libX11 or libGL just fails (because...
I was thinking about loading ld.so via `LoadProgram` instead and using it to load libdl, but on OpenBSD it isn't a static executable.
Yet another option would be to compile the required bits from xorg statically with cosmopolitan. That sounds scary and bloated, but a program linking statically against xorg isn't that big...
`errno` constants would be a PITA though.
Which brings me again to this question: https://github.com/jart/cosmopolitan/issues/103#issuecomment-939269631
What I'm doing in https://github.com/jacereda/cosmogfx is loading a shared binary liked against `libdl` and jumping back to the original executable code providing the `libdl` entry points. I guess this could...
Cosmoc is just a wrapper to normal gcc with cosmopolitan options. In my case it looks like: ```exec /nix/store/s5hkav7whndbfz0szshpb46h4idqdq9a-gcc-wrapper-10.3.0/bin/gcc -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -fno-omit-frame-pointer -pg -mnop-mcount -fno-stack-protector...