vmlinux_64.lds.S 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifdef CONFIG_SMP
  2. /*
  3. * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
  4. * output PHDR, so the next output section - __data_nosave - should
  5. * start another section data.init2. Also, pda should be at the head of
  6. * percpu area. Preallocate it and define the percpu offset symbol
  7. * so that it can be accessed as a percpu variable.
  8. */
  9. . = ALIGN(PAGE_SIZE);
  10. PERCPU_VADDR(0, :percpu)
  11. #else
  12. PERCPU(PAGE_SIZE)
  13. #endif
  14. . = ALIGN(PAGE_SIZE);
  15. __init_end = .;
  16. .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
  17. . = ALIGN(PAGE_SIZE);
  18. __nosave_begin = .;
  19. *(.data.nosave)
  20. . = ALIGN(PAGE_SIZE);
  21. __nosave_end = .;
  22. } :data.init2
  23. /* use another section data.init2, see PERCPU_VADDR() above */
  24. .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
  25. . = ALIGN(PAGE_SIZE);
  26. __bss_start = .; /* BSS */
  27. *(.bss.page_aligned)
  28. *(.bss)
  29. __bss_stop = .;
  30. }
  31. .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
  32. . = ALIGN(PAGE_SIZE);
  33. __brk_base = .;
  34. . += 64 * 1024; /* 64k alignment slop space */
  35. *(.brk_reservation) /* areas brk users have reserved */
  36. __brk_limit = .;
  37. }
  38. _end = . ;
  39. /* Sections to be discarded */
  40. /DISCARD/ : {
  41. *(.exitcall.exit)
  42. *(.eh_frame)
  43. *(.discard)
  44. }