4 ms·
At least part of the "fun" on a loosely modern operating system is learning the nuts and bolts of the executable format and loading conventions. I've never spe
by angusgr 16y ago
At least part of the "fun" on a loosely modern operating system is learning the nuts and bolts of the executable format and loading conventions.
I've never spent much time there, but some of the ideas are laid out well in this two part post:
http://blog.ksplice.com/2010/04/libc-free-world-2/ http://blog.ksplice.com/2010/04/libc-free-world-2/
Doing it with _just_ a hex editor (ie writing out the ELF headers and sections yourself) may not be exactly what the commenter did, though. Cos that sounds really tedious.
I imagine that even writing "Hello, World" in the simpler way that you describe, on a simpler system (Apple IIe or so), would probably teach me something. I remember trying to write 6502 machine code in hex (no assembler) on my IIe when I was about 10 years old. It never worked then, I wonder if it would work now?
- drblast 16y agoIt's not that difficult or tedious, but it does require that you read the elf specification, or write your own "OS" from scratch. http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm... The idea is that you strip away everything that does something for you so that you are sure to completely understand the entire process with no "pushing the green compile button."