vsyscall-note.S 778 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
  4. * Here we can supply some information useful to userland.
  5. */
  6. #include <linux/uts.h>
  7. #include <linux/version.h>
  8. #define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type) \
  9. .section name, flags; \
  10. .balign 4; \
  11. .long 1f - 0f; /* name length */ \
  12. .long 3f - 2f; /* data length */ \
  13. .long type; /* note type */ \
  14. 0: .asciz vendor; /* vendor name */ \
  15. 1: .balign 4; \
  16. 2:
  17. #define ASM_ELF_NOTE_END \
  18. 3: .balign 4; /* pad out section */ \
  19. .previous
  20. ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0)
  21. .long LINUX_VERSION_CODE
  22. ASM_ELF_NOTE_END