vdso.lds.S 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Author: Huacai Chen <[email protected]>
  4. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  5. */
  6. OUTPUT_FORMAT("elf64-loongarch", "elf64-loongarch", "elf64-loongarch")
  7. OUTPUT_ARCH(loongarch)
  8. SECTIONS
  9. {
  10. PROVIDE(_start = .);
  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. PROVIDE (__etext = .);
  22. PROVIDE (_etext = .);
  23. PROVIDE (etext = .);
  24. .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
  25. .eh_frame : { KEEP (*(.eh_frame)) } :text
  26. .dynamic : { *(.dynamic) } :text :dynamic
  27. .rodata : { *(.rodata*) } :text
  28. _end = .;
  29. PROVIDE(end = .);
  30. /DISCARD/ : {
  31. *(.gnu.attributes)
  32. *(.note.GNU-stack)
  33. *(.data .data.* .gnu.linkonce.d.* .sdata*)
  34. *(.bss .sbss .dynbss .dynsbss)
  35. }
  36. }
  37. PHDRS
  38. {
  39. text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
  40. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  41. note PT_NOTE FLAGS(4); /* PF_R */
  42. eh_frame_hdr PT_GNU_EH_FRAME;
  43. }
  44. VERSION
  45. {
  46. LINUX_5.10 {
  47. global:
  48. __vdso_getcpu;
  49. __vdso_clock_getres;
  50. __vdso_clock_gettime;
  51. __vdso_gettimeofday;
  52. __vdso_rt_sigreturn;
  53. local: *;
  54. };
  55. }
  56. /*
  57. * Make the sigreturn code visible to the kernel.
  58. */
  59. VDSO_sigreturn = __vdso_rt_sigreturn;