module-lto.lds.S 851 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <asm/page.h>
  3. /*
  4. * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and
  5. * -ffunction-sections, which increases the size of the final module.
  6. * Merge the split sections in the final binary.
  7. */
  8. SECTIONS {
  9. /*
  10. * LLVM may emit .eh_frame with CONFIG_CFI_CLANG despite
  11. * -fno-asynchronous-unwind-tables. Discard the section.
  12. */
  13. /DISCARD/ : {
  14. *(.eh_frame)
  15. }
  16. .bss : {
  17. *(.bss .bss.[0-9a-zA-Z_]*)
  18. *(.bss..L*)
  19. }
  20. .data : {
  21. *(.data .data.[0-9a-zA-Z_]*)
  22. *(.data..L*)
  23. }
  24. .rodata : {
  25. *(.rodata .rodata.[0-9a-zA-Z_]*)
  26. *(.rodata..L*)
  27. }
  28. /*
  29. * With CFI_CLANG, ensure __cfi_check is at the beginning of the
  30. * .text section, and that the section is aligned to page size.
  31. */
  32. .text : ALIGN(PAGE_SIZE) {
  33. *(.text.__cfi_check)
  34. *(.text .text.[0-9a-zA-Z_]* .text..L.cfi*)
  35. }
  36. }