module.lds.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #include <asm/page-def.h>
  3. SECTIONS {
  4. #ifdef CONFIG_ARM64_MODULE_PLTS
  5. .plt 0 : { BYTE(0) }
  6. .init.plt 0 : { BYTE(0) }
  7. .text.ftrace_trampoline 0 : { BYTE(0) }
  8. #endif
  9. #ifdef CONFIG_KASAN_SW_TAGS
  10. /*
  11. * Outlined checks go into comdat-deduplicated sections named .text.hot.
  12. * Because they are in comdats they are not combined by the linker and
  13. * we otherwise end up with multiple sections with the same .text.hot
  14. * name in the .ko file. The kernel module loader warns if it sees
  15. * multiple sections with the same name so we use this sections
  16. * directive to force them into a single section and silence the
  17. * warning.
  18. */
  19. .text.hot : { *(.text.hot) }
  20. #endif
  21. #ifdef CONFIG_KVM
  22. .hyp.text : ALIGN(PAGE_SIZE) {
  23. *(.hyp.text)
  24. . = ALIGN(PAGE_SIZE);
  25. }
  26. .hyp.bss : ALIGN(PAGE_SIZE) {
  27. *(.hyp.bss)
  28. . = ALIGN(PAGE_SIZE);
  29. }
  30. .hyp.rodata : ALIGN(PAGE_SIZE) {
  31. *(.hyp.rodata)
  32. . = ALIGN(PAGE_SIZE);
  33. }
  34. .hyp.data : ALIGN(PAGE_SIZE) {
  35. *(.hyp.data)
  36. . = ALIGN(PAGE_SIZE);
  37. }
  38. .hyp.reloc : ALIGN(4) { *(.hyp.reloc) }
  39. #endif
  40. #ifdef CONFIG_UNWIND_TABLES
  41. /*
  42. * Currently, we only use unwind info at module load time, so we can
  43. * put it into the .init allocation.
  44. */
  45. .init.eh_frame : { *(.eh_frame) }
  46. #endif
  47. }