Ghost Kernel

Shared library support added 2020/01/18, 20:05:33

I've finally implemented basic support for shared library objects in the kernel's elf32 loader. This can be found in the branch dynamic-linking.

The main motivation for this was improving the size of executables and as a preparation for future performance improvements. The current implementation always binds all symbols early (so it behaves as if LD_BIND_NOW was set), so lazy-linking is not yet in use.

With this change, the build processes of libc, libghostapi and libuser where also adapted so they additionally emit .so files. By default the system libraries libc and libghostapi will therefore now be linked shared. The "cocorun" demo program is used to test out various features now.

The next steps are getting support for thread-local storage when such a variable is provided or accessed by a shared library. In the existing implementation, the TLS segment of the main object is loaded and a copy of that TLS master is assigned to each thread. There is some work left to do when working with shared libraries now, because each loaded ELF object can have a TLS segment and TLS relocations which must be fulfilled. For this the process structure must be adapted so that all of this information can be stored and evaluated later on.

Anyway, not much to see but have a look at this nice little shared library call :-)


Write a comment...
  • sizimmape 2022/11/18, 08:30:48

    This is no mystical mumbo jumbo, this is real <a href=>penicillin doxycycline</a> Walpole AL, Williams MHC Aromatic amines as carcinogens in industry

  • Outwady 2022/11/13, 10:59:22

    <a href=>better business bureau online pharmacy priligy</a> The investigators performed concomitant laparoscopic supracervical hysterectomy in 60 patients and converted six cases to laparotomy

  • Michel Gomes 2020/01/27, 21:50:02

    :D Nice dude, depois de muito tempo acompanhando vejo atualizações maravilhosas, Parabéns!

  • Marco Cicognani 2020/01/20, 13:38:53

    Hey Max,

    happy to see updates

    • Max 2020/02/13, 04:01:09

      Hey Marco, nice to see you're still interested. :-)