vmlinux.lds.S 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #include <asm-generic/vmlinux.lds.h>
  2. #include <asm/page.h>
  3. #include <asm/thread_info.h>
  4. #define ROMTOP 0x000000
  5. #define RAMTOP 0x400000
  6. jiffies = jiffies_64 + 4;
  7. ENTRY(_start)
  8. SECTIONS
  9. {
  10. #if defined(CONFIG_ROMKERNEL)
  11. . = ROMTOP;
  12. .vectors :
  13. {
  14. _vector = . ;
  15. *(.vector*)
  16. }
  17. #else
  18. . = RAMTOP;
  19. _ramstart = .;
  20. . = . + CONFIG_OFFSET;
  21. #endif
  22. _text = .;
  23. HEAD_TEXT_SECTION
  24. .text : {
  25. _stext = . ;
  26. TEXT_TEXT
  27. SCHED_TEXT
  28. CPUIDLE_TEXT
  29. LOCK_TEXT
  30. #if defined(CONFIG_ROMKERNEL)
  31. *(.int_redirect)
  32. #endif
  33. _etext = . ;
  34. }
  35. EXCEPTION_TABLE(16)
  36. NOTES
  37. RO_DATA_SECTION(4)
  38. ROMEND = .;
  39. #if defined(CONFIG_ROMKERNEL)
  40. . = RAMTOP;
  41. _ramstart = .;
  42. #define ADDR(x) ROMEND
  43. #endif
  44. _sdata = . ;
  45. __data_start = . ;
  46. RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE)
  47. #if defined(CONFIG_ROMKERNEL)
  48. #undef ADDR
  49. #endif
  50. . = ALIGN(0x4) ;
  51. __init_begin = .;
  52. INIT_TEXT_SECTION(4)
  53. INIT_DATA_SECTION(4)
  54. SECURITY_INIT
  55. __init_end = .;
  56. _edata = . ;
  57. _begin_data = LOADADDR(.data);
  58. _sbss =.;
  59. BSS_SECTION(0, 0 ,0)
  60. _ebss =.;
  61. _ramend = .;
  62. _end = .;
  63. DISCARDS
  64. }