vmlinux.lds.S 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <asm-generic/vmlinux.lds.h>
  3. OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
  4. #undef i386
  5. #include <asm/cache.h>
  6. #include <asm/page_types.h>
  7. #ifdef CONFIG_X86_64
  8. OUTPUT_ARCH(i386:x86-64)
  9. ENTRY(startup_64)
  10. #else
  11. OUTPUT_ARCH(i386)
  12. ENTRY(startup_32)
  13. #endif
  14. SECTIONS
  15. {
  16. /* Be careful parts of head_64.S assume startup_32 is at
  17. * address 0.
  18. */
  19. . = 0;
  20. .head.text : {
  21. _head = . ;
  22. HEAD_TEXT
  23. _ehead = . ;
  24. }
  25. .rodata..compressed : {
  26. *(.rodata..compressed)
  27. }
  28. .text : {
  29. _text = .; /* Text */
  30. *(.text)
  31. *(.text.*)
  32. _etext = . ;
  33. }
  34. .rodata : {
  35. _rodata = . ;
  36. *(.rodata) /* read-only data */
  37. *(.rodata.*)
  38. _erodata = . ;
  39. }
  40. .got : {
  41. _got = .;
  42. KEEP(*(.got.plt))
  43. KEEP(*(.got))
  44. _egot = .;
  45. }
  46. .data : {
  47. _data = . ;
  48. *(.data)
  49. *(.data.*)
  50. _edata = . ;
  51. }
  52. . = ALIGN(L1_CACHE_BYTES);
  53. .bss : {
  54. _bss = . ;
  55. *(.bss)
  56. *(.bss.*)
  57. *(COMMON)
  58. . = ALIGN(8); /* For convenience during zeroing */
  59. _ebss = .;
  60. }
  61. #ifdef CONFIG_X86_64
  62. . = ALIGN(PAGE_SIZE);
  63. .pgtable : {
  64. _pgtable = . ;
  65. *(.pgtable)
  66. _epgtable = . ;
  67. }
  68. #endif
  69. . = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */
  70. _end = .;
  71. }