This commit is contained in:
2026-08-14 21:31:01 +02:00
parent 40cea4dedd
commit ac9d47fa16
58 changed files with 148 additions and 37 deletions
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/archctl.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/channel.h>
#include <kernel/vdso.h>
+2 -2
View File
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
#include <common/compiler.h>
#include <kernel/vdso.h>
[[__used, __section(".vdso_data")]]
const volatile struct vdso_kernel_data vdso_data = {0};
static_assert(sizeof(vdso_data) <= 0x1000);
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/futex.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/handle.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/mem.h>
#include <kernel/vdso.h>
+7 -1
View File
@@ -19,7 +19,7 @@ vdso_link_args = [
# 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(
real_vdso = shared_library(
'zinnia-vdso',
name_prefix: '',
c_args: vdso_c_args,
@@ -44,5 +44,11 @@ vdso = shared_library(
],
)
vdso = custom_target(
command: [find_program('cp'), '@INPUT@', '@OUTPUT@'],
input: real_vdso,
output: 'vdso.bin',
)
# Tell the kernel where the built binary lives so we can #embed it.
kernel_c_args += ['-DVDSO_PATH="' + vdso.full_path() + '"']
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/namespace.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/random.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/status.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/system.h>
#include <kernel/vdso.h>
+2
View File
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
#include <zinnia/thread.h>
#include <kernel/vdso.h>
+9 -7
View File
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* SPDX-License-Identifier: MIT */
VERSION {
ZINNIA_0 {
@@ -11,7 +11,7 @@ VERSION {
PHDRS {
text PT_LOAD FILEHDR PHDRS FLAGS(5);
dynamic PT_DYNAMIC FLAGS(4);
note PT_NOTE FLAGS(4);
data PT_LOAD FLAGS(4);
}
SECTIONS
@@ -28,10 +28,6 @@ SECTIONS
*(.got .got.*)
} :text
.data ALIGN(CONSTANT(MAXPAGESIZE)) : {
*(.vdso_data)
} :text
.dynsym : {
*(.dynsym)
} :text
@@ -44,9 +40,15 @@ SECTIONS
*(.dynamic)
} :text :dynamic
.vdso_data ALIGN(CONSTANT(MAXPAGESIZE)) : {
*(.vdso_data)
. = ALIGN(CONSTANT(MAXPAGESIZE));
} :data
/DISCARD/ :
{
*(.data*)
*(.data*) /* No data allowed besides the vDSO data */
*(.bss*)
*(.comment*)
*(.eh_frame*)