3 ms·
anyone know what applications you can run on it ? does it support ELF so we can in theory use it or is this just a research project?
by sigmonsays 4y ago
anyone know what applications you can run on it ?
does it support ELF so we can in theory use it or is this just a research project?
- skyyler 4y agohttps://doc.redox-os.org/book/ch04-19-programs-libraries.html https://doc.redox-os.org/book/ch04-19-programs-libraries.htm...
- _8j50 4y ago> Redox does not support dynamic-link libraries yet (issue #927), so the libraries that a program uses are statically linked into its compiled binary. Sounds like a feature that shouldn't be "fixed".
- yjftsjthsd-h 4y agoThere exist some cases that don't play nice with full/mandatory static linking, like programs that load extensions by loading them as libraries at runtime.
- zokier 4y agoI don't think system-level static linking precludes loading code for e.g. extensions at runtime. Although admittedly I can't say I know any examples of doing that offhand, and in many ways you'd be building an limited ad-hoc dynamic linking system.
- yjftsjthsd-h 4y agohttps://gitlab.redox-os.org/redox-os/redox/-/issues/927#note_3252 https://gitlab.redox-os.org/redox-os/redox/-/issues/927#note... implies that redox doesn't currently have dlopen(); while I agree that you hardly need dynamic linking for everything in order to support plugins, my meaning was that you need to allow at least some dynamic linking for it to work.
- bpye 4y agoI guess you could include your own dynamic linker in your binary. Mmap the shared object, perform the relocations, etc. It seems like you could write a static library to do this so that the Redox itself doesn't need any specific support?
- zokier 4y agoWith PIC you wouldn't even need to do relocs?
- bpye 4y agoMakes it easier, but you can't entirely avoid relocations. https://eli.thegreenplace.net/2011/11/03/position-independent-code-pic-in-shared-libraries https://eli.thegreenplace.net/2011/11/03/position-independen... seems like a decent explanation.
- brendank310 4y agoWe took this approach with the first version of a from-scratch hypervisor at my last job. Portions of the hypervisor were separated into different shared libraries and we wrote a custom ELF loader to do the relocations. It was interesting but ultimately it was scratched in favor of a large static binary.