vdso
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
vdso_c_args = [
|
||||
'-ffreestanding',
|
||||
'-fno-stack-protector',
|
||||
'-fno-omit-frame-pointer',
|
||||
'-fPIE',
|
||||
'-fPIC',
|
||||
'-nostdinc',
|
||||
'-DIN_VDSO',
|
||||
]
|
||||
|
||||
vdso_lds = meson.current_source_dir() / 'vdso.ld'
|
||||
|
||||
vdso_link_args = [
|
||||
'-ffreestanding',
|
||||
'-nostdlib',
|
||||
'-static',
|
||||
'-T' + vdso_lds,
|
||||
]
|
||||
|
||||
# Build a shared library, which we are going to embed next.
|
||||
# TODO: We need to ensure there are no relocations inside the vDSO.
|
||||
vdso = shared_library(
|
||||
'zinnia-vdso',
|
||||
name_prefix: '',
|
||||
c_args: vdso_c_args,
|
||||
include_directories: [
|
||||
common_includes,
|
||||
kernel_includes,
|
||||
],
|
||||
link_args: vdso_link_args,
|
||||
link_depends: vdso_lds,
|
||||
sources: [
|
||||
'archctl.c',
|
||||
'channel.c',
|
||||
'data.c',
|
||||
'futex.c',
|
||||
'handle.c',
|
||||
'mem.c',
|
||||
'namespace.c',
|
||||
'random.c',
|
||||
'status.c',
|
||||
'system.c',
|
||||
'thread.c',
|
||||
],
|
||||
)
|
||||
|
||||
# Tell the kernel where the built binary lives so we can #embed it.
|
||||
kernel_c_args += ['-DVDSO_PATH="' + vdso.full_path() + '"']
|
||||
Reference in New Issue
Block a user