mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 09:16:43 +07:00
c97db4a0a7
This patch adds an ELF note to the vDSO giving the LINUX_VERSION_CODE value. Having this in the vDSO lets the dynamic linker avoid the `uname' syscall it now always does at startup to ascertain the kernel ABI available. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
26 lines
739 B
ArmAsm
26 lines
739 B
ArmAsm
/*
|
|
* 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/uts.h>
|
|
#include <linux/version.h>
|
|
|
|
#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \
|
|
.section name, flags; \
|
|
.balign 4; \
|
|
.long 1f - 0f; /* name length */ \
|
|
.long 3f - 2f; /* data length */ \
|
|
.long type; /* note type */ \
|
|
0: .asciz vendor; /* vendor name */ \
|
|
1: .balign 4; \
|
|
2:
|
|
|
|
#define ASM_ELF_NOTE_END \
|
|
3: .balign 4; /* pad out section */ \
|
|
.previous
|
|
|
|
ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0)
|
|
.long LINUX_VERSION_CODE
|
|
ASM_ELF_NOTE_END
|