vdso.lds.S 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * SPDX-License-Identifier: GPL-2.0
  3. * Copyright (C) 2005-2017 Andes Technology Corporation
  4. */
  5. #include <linux/const.h>
  6. #include <asm/page.h>
  7. #include <asm/vdso.h>
  8. OUTPUT_ARCH(nds32)
  9. SECTIONS
  10. {
  11. . = SIZEOF_HEADERS;
  12. .hash : { *(.hash) } :text
  13. .gnu.hash : { *(.gnu.hash) }
  14. .dynsym : { *(.dynsym) }
  15. .dynstr : { *(.dynstr) }
  16. .gnu.version : { *(.gnu.version) }
  17. .gnu.version_d : { *(.gnu.version_d) }
  18. .gnu.version_r : { *(.gnu.version_r) }
  19. .note : { *(.note.*) } :text :note
  20. .text : { *(.text*) } :text
  21. .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
  22. .eh_frame : { KEEP (*(.eh_frame)) } :text
  23. .dynamic : { *(.dynamic) } :text :dynamic
  24. .rodata : { *(.rodata*) } :text
  25. /DISCARD/ : {
  26. *(.note.GNU-stack)
  27. *(.data .data.* .gnu.linkonce.d.* .sdata*)
  28. *(.bss .sbss .dynbss .dynsbss)
  29. }
  30. }
  31. /*
  32. * We must supply the ELF program headers explicitly to get just one
  33. * PT_LOAD segment, and set the flags explicitly to make segments read-only.
  34. */
  35. PHDRS
  36. {
  37. text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
  38. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  39. note PT_NOTE FLAGS(4); /* PF_R */
  40. eh_frame_hdr PT_GNU_EH_FRAME;
  41. }
  42. /*
  43. * This controls what symbols we export from the DSO.
  44. */
  45. VERSION
  46. {
  47. LINUX_4 {
  48. global:
  49. __kernel_rt_sigreturn;
  50. __vdso_gettimeofday;
  51. __vdso_clock_getres;
  52. __vdso_clock_gettime;
  53. local: *;
  54. };
  55. }
  56. /*
  57. * Make the rt_sigreturn code visible to the kernel.
  58. */
  59. VDSO_rt_sigtramp = __kernel_rt_sigreturn;