This is a bit of a hack. /dev is presented as a new pseudo file type
until I finish the VFS overhaul. This fake file presents a directory
with entries for all of the VFS nodes that are children of it. The
future VFS will do this on its own, thus making this superfluous.
WARNING: THIS BREAKS PARTITIONS
Until I get partition maps and can produce device entries like
/dev/hda1, partitions will be broken, so DON'T TRY TO BUILD AN IMAGE
WITH THE IMAGE BUILDER.
Hopefully this is all rectified in under 24 hours...
Still need to do proper loading of the ELF sections somewhere, but other
than that, we've got a standard interface now. Needs a syscall so we can
write an insmod or something like that.
There's a lot here, so let's through it:
- Lots of work to include a symbol table in the kernel. We can't rely on
our bootloader to give us our own ELF information, so we do this
separately. This probably should be changed to output a C source
rather than assembly, but that's a TODO.
- Makefile can now generate modules. It works basically the same way any
other kernel object works, expect with a slightly different linking
scheme.
- Commands have been added to the debug shell to load modules, but they
don't work yet - still need to get through relocation and linking.
- Commands have been added to the debug shell to print the symbol list,
as well as print symbol values (but note that printing symbol values
is kinda dangerous if you don't know what they are, so don't just go
printing things willy-nilly).
I know, this is a lot slower than the old one, but it's a transition to
a new-new args parser that will use a hashmap... as soon as I get around
to writing a hashmap implementation.