Commit 0a9f2a61 authored by Andreas Schwab's avatar Andreas Schwab Committed by Palmer Dabbelt

riscv: add Linux note to vdso

The Linux note in the vdso allows glibc to check the running kernel
version without having to issue the uname syscall.
Signed-off-by: default avatarAndreas Schwab <schwab@suse.de>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent c749bb2d
...@@ -12,7 +12,7 @@ vdso-syms += getcpu ...@@ -12,7 +12,7 @@ vdso-syms += getcpu
vdso-syms += flush_icache vdso-syms += flush_icache
# Files to link into the vdso # Files to link into the vdso
obj-vdso = $(patsubst %, %.o, $(vdso-syms)) obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
# Build rules # Build rules
targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds vdso-dummy.o targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds vdso-dummy.o
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
* Here we can supply some information useful to userland.
*/
#include <linux/elfnote.h>
#include <linux/version.h>
ELFNOTE_START(Linux, 0, "a")
.long LINUX_VERSION_CODE
ELFNOTE_END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment