note.s

来自「底层驱动开发」· S 代码 · 共 26 行

S
26
字号
/* * 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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?