vdso.lds.S 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Adapted from arm64 version.
  4. *
  5. * GNU linker script for the VDSO library.
  6. *
  7. * Copyright (C) 2012 ARM Limited
  8. *
  9. * Author: Will Deacon <[email protected]>
  10. * Heavily based on the vDSO linker scripts for other archs.
  11. */
  12. #include <linux/const.h>
  13. #include <asm/page.h>
  14. #include <asm/vdso.h>
  15. OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
  16. OUTPUT_ARCH(arm)
  17. SECTIONS
  18. {
  19. PROVIDE(_start = .);
  20. . = SIZEOF_HEADERS;
  21. .hash : { *(.hash) } :text
  22. .gnu.hash : { *(.gnu.hash) }
  23. .dynsym : { *(.dynsym) }
  24. .dynstr : { *(.dynstr) }
  25. .gnu.version : { *(.gnu.version) }
  26. .gnu.version_d : { *(.gnu.version_d) }
  27. .gnu.version_r : { *(.gnu.version_r) }
  28. .note : { *(.note.*) } :text :note
  29. .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
  30. .eh_frame : { KEEP (*(.eh_frame)) } :text
  31. .dynamic : { *(.dynamic) } :text :dynamic
  32. .rodata : { *(.rodata*) } :text
  33. .text : { *(.text*) } :text =0xe7f001f2
  34. .got : { *(.got) }
  35. .rel.plt : { *(.rel.plt) }
  36. /DISCARD/ : {
  37. *(.note.GNU-stack)
  38. *(.data .data.* .gnu.linkonce.d.* .sdata*)
  39. *(.bss .sbss .dynbss .dynsbss)
  40. }
  41. }
  42. /*
  43. * We must supply the ELF program headers explicitly to get just one
  44. * PT_LOAD segment, and set the flags explicitly to make segments read-only.
  45. */
  46. PHDRS
  47. {
  48. text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
  49. dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  50. note PT_NOTE FLAGS(4); /* PF_R */
  51. eh_frame_hdr PT_GNU_EH_FRAME;
  52. }
  53. VERSION
  54. {
  55. LINUX_2.6 {
  56. global:
  57. __vdso_clock_gettime;
  58. __vdso_gettimeofday;
  59. __vdso_clock_getres;
  60. __vdso_clock_gettime64;
  61. local: *;
  62. };
  63. }