diff options
author | Roland McGrath <roland@redhat.com> | 2005-04-16 15:24:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:24:48 -0700 |
commit | c97db4a0a7d4d5be8c64a8d649a4425ee195b05c (patch) | |
tree | e310d0f9918d7a47359872fa519e2abe10b5d522 /arch/i386/kernel/vsyscall-note.S | |
parent | ecd02dddd1d5bfc2141cbd0e205a53fb9d849c9e (diff) | |
download | op-kernel-dev-c97db4a0a7d4d5be8c64a8d649a4425ee195b05c.zip op-kernel-dev-c97db4a0a7d4d5be8c64a8d649a4425ee195b05c.tar.gz |
[PATCH] i386 vDSO: add PT_NOTE segment
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>
Diffstat (limited to 'arch/i386/kernel/vsyscall-note.S')
-rw-r--r-- | arch/i386/kernel/vsyscall-note.S | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/i386/kernel/vsyscall-note.S b/arch/i386/kernel/vsyscall-note.S new file mode 100644 index 0000000..d4b5be4 --- /dev/null +++ b/arch/i386/kernel/vsyscall-note.S @@ -0,0 +1,25 @@ +/* + * 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 |