vmlinux_64.lds.S 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * .exit.text is discard at runtime, not link time, to deal with
  3. * references from .altinstructions and .eh_frame
  4. */
  5. .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
  6. EXIT_TEXT
  7. }
  8. .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
  9. EXIT_DATA
  10. }
  11. #ifdef CONFIG_BLK_DEV_INITRD
  12. . = ALIGN(PAGE_SIZE);
  13. .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
  14. __initramfs_start = .;
  15. *(.init.ramfs)
  16. __initramfs_end = .;
  17. }
  18. #endif
  19. #ifdef CONFIG_SMP
  20. /*
  21. * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
  22. * output PHDR, so the next output section - __data_nosave - should
  23. * start another section data.init2. Also, pda should be at the head of
  24. * percpu area. Preallocate it and define the percpu offset symbol
  25. * so that it can be accessed as a percpu variable.
  26. */
  27. . = ALIGN(PAGE_SIZE);
  28. PERCPU_VADDR(0, :percpu)
  29. #else
  30. PERCPU(PAGE_SIZE)
  31. #endif
  32. . = ALIGN(PAGE_SIZE);
  33. __init_end = .;
  34. .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
  35. . = ALIGN(PAGE_SIZE);
  36. __nosave_begin = .;
  37. *(.data.nosave)
  38. . = ALIGN(PAGE_SIZE);
  39. __nosave_end = .;
  40. } :data.init2
  41. /* use another section data.init2, see PERCPU_VADDR() above */
  42. .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
  43. . = ALIGN(PAGE_SIZE);
  44. __bss_start = .; /* BSS */
  45. *(.bss.page_aligned)
  46. *(.bss)
  47. __bss_stop = .;
  48. }
  49. .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
  50. . = ALIGN(PAGE_SIZE);
  51. __brk_base = .;
  52. . += 64 * 1024; /* 64k alignment slop space */
  53. *(.brk_reservation) /* areas brk users have reserved */
  54. __brk_limit = .;
  55. }
  56. _end = . ;
  57. /* Sections to be discarded */
  58. /DISCARD/ : {
  59. *(.exitcall.exit)
  60. *(.eh_frame)
  61. *(.discard)
  62. }