vdso.lds.S 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Adapted from arm64 version.
  4. *
  5. * GNU linker script for the VDSO library.
  6. * Heavily based on the vDSO linker scripts for other archs.
  7. *
  8. * Copyright (C) 2012-2018 ARM Limited
  9. */
  10. #include <linux/const.h>
  11. #include <asm/page.h>
  12. #include <asm/vdso.h>
  13. #include <asm-generic/vmlinux.lds.h>
  14. OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
  15. OUTPUT_ARCH(arm)
  16. SECTIONS
  17. {
  18. PROVIDE_HIDDEN(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE);
  19. #ifdef CONFIG_TIME_NS
  20. PROVIDE_HIDDEN(_timens_data = _vdso_data + PAGE_SIZE);
  21. #endif
  22. . = VDSO_LBASE + SIZEOF_HEADERS;
  23. .hash : { *(.hash) } :text
  24. .gnu.hash : { *(.gnu.hash) }
  25. .dynsym : { *(.dynsym) }
  26. .dynstr : { *(.dynstr) }
  27. .gnu.version : { *(.gnu.version) }
  28. .gnu.version_d : { *(.gnu.version_d) }
  29. .gnu.version_r : { *(.gnu.version_r) }
  30. .note : { *(.note.*) } :text :note
  31. .dynamic : { *(.dynamic) } :text :dynamic
  32. .rodata : {
  33. *(.rodata*)
  34. *(.got)
  35. *(.got.plt)
  36. *(.plt)
  37. *(.rel.iplt)
  38. *(.iplt)
  39. *(.igot.plt)
  40. } :text
  41. .text : {
  42. *(.text*)
  43. *(.glue_7)
  44. *(.glue_7t)
  45. *(.vfp11_veneer)
  46. *(.v4_bx)
  47. } :text =0xe7f001f2
  48. .rel.dyn : { *(.rel*) }
  49. .ARM.exidx : { *(.ARM.exidx*) }
  50. DWARF_DEBUG
  51. ELF_DETAILS
  52. .ARM.attributes 0 : { *(.ARM.attributes) }
  53. /DISCARD/ : {
  54. *(.note.GNU-stack)
  55. *(.data .data.* .gnu.linkonce.d.* .sdata*)
  56. *(.bss .sbss .dynbss .dynsbss)
  57. }
  58. }
  59. /*
  60. * We must supply the ELF program headers explicitly to get just one
  61. * PT_LOAD segment, and set the flags explicitly to make segments read-only.
  62. */
  63. PHDRS
  64. {
  65. text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
  66. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  67. note PT_NOTE FLAGS(4); /* PF_R */
  68. }
  69. VERSION
  70. {
  71. LINUX_2.6 {
  72. global:
  73. __vdso_clock_gettime;
  74. __vdso_gettimeofday;
  75. __vdso_clock_getres;
  76. __vdso_clock_gettime64;
  77. local: *;
  78. };
  79. }