mirror of
https://github.com/clearlinux/graphene.git
synced 2026-08-21 13:18:07 +00:00
6ea8e951f0
Instead of depending on dynamic linking for LibOS entry point (syscalldb), we pass a pointer in the shim_tcb structure, so that the patched code can enter syscall using 'jmp *%gs:<offset>'. The same applies to the vDSO syscall code that previously needed an up-to-date pointer to syscalldb function. Now, there is no need to adjust the values inside the vDSO page. In addition, this change removes the other two instances where we import a symbol directly from LibOS: register_library (can be also done through GS register) and glibc_version (not important because we build Graphene and glibc together). This simplifies things because the dynamic linking necessary to make the syscalldb function available had to be performed by LibOS itself (in many cases, effectively doing a second pass of dynamic linking after ld.so). After this change, there will be no need for LibOS to perform dynamic linking, and the ELF loading code can be simplified. Signed-off-by: Paweł Marczewski <pawel@invisiblethingslab.com>