vkernel - Module loading for vkernel64
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 16 Aug 2013 02:35:52 +0000 (19:35 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 16 Aug 2013 02:35:52 +0000 (19:35 -0700)
commit086a8efc161a68dd89a92e4f903b7173eba5ae65
tree94254374e6eeb53bb06b5e1b993115710d5a2217
parent9e4f4f966202bd10c164ec913b10b80aad5a44e7
vkernel - Module loading for vkernel64

* Fix a missing vm_object_drop() in the kldload error path.

* Load modules using sbrk()'d memory (for now).

* Hack rtld to accept a new environment variable, LD_SHAREDLIB_BASE,
  which forces shared libraries to be mmap()'d at the specified address.

* Hack the vkernel64 binary to re-exec itself in order to set
  LD_SHAREDLIB_BASE to low memory.  This forces shared libraries into
  low memory which the KLD module loader can relocate against, instead
  of high memory which it can't.

* test/vkernel/Makefile now builds and installs modules by default

With-fixes-from: tuxillo
libexec/rtld-elf/map_object.c
libexec/rtld-elf/rtld.c
libexec/rtld-elf/rtld.h
sys/kern/link_elf_obj.c
sys/platform/vkernel64/platform/init.c
test/vkernel/Makefile