ld.script 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * ld.script for compressed kernel support of MIPS
  3. *
  4. * Copyright (C) 2009 Lemote Inc.
  5. * Author: Wu Zhangjin <wuzj@lemote.com>
  6. */
  7. OUTPUT_ARCH(mips)
  8. ENTRY(start)
  9. SECTIONS
  10. {
  11. /* . = VMLINUZ_LOAD_ADDRESS */
  12. /* read-only */
  13. _text = .; /* Text and read-only data */
  14. .text : {
  15. _ftext = . ;
  16. *(.text)
  17. *(.rodata)
  18. } = 0
  19. _etext = .; /* End of text section */
  20. /* writable */
  21. .data : { /* Data */
  22. _fdata = . ;
  23. *(.data)
  24. /* Put the compressed image here, so bss is on the end. */
  25. __image_begin = .;
  26. *(.image)
  27. __image_end = .;
  28. CONSTRUCTORS
  29. }
  30. .sdata : { *(.sdata) }
  31. . = ALIGN(4);
  32. _edata = .; /* End of data section */
  33. /* BSS */
  34. __bss_start = .;
  35. _fbss = .;
  36. .sbss : { *(.sbss) *(.scommon) }
  37. .bss : {
  38. *(.dynbss)
  39. *(.bss)
  40. *(COMMON)
  41. }
  42. . = ALIGN(4);
  43. _end = . ;
  44. /* These are needed for ELF backends which have not yet been converted
  45. * to the new style linker. */
  46. .stab 0 : { *(.stab) }
  47. .stabstr 0 : { *(.stabstr) }
  48. /* These must appear regardless of . */
  49. .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
  50. .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
  51. /* Sections to be discarded */
  52. /DISCARD/ : {
  53. *(.MIPS.options)
  54. *(.options)
  55. *(.pdr)
  56. *(.reginfo)
  57. *(.comment)
  58. *(.note)
  59. }
  60. }