ld.script 777 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * ld.script for compressed kernel support of MIPS
  3. *
  4. * Copyright (C) 2009 Lemote Inc.
  5. * Author: Wu Zhangjin <wuzhanjing@gmail.com>
  6. * Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com>
  7. */
  8. OUTPUT_ARCH(mips)
  9. ENTRY(start)
  10. SECTIONS
  11. {
  12. /* Text and read-only data */
  13. /* . = VMLINUZ_LOAD_ADDRESS; */
  14. .text : {
  15. *(.text)
  16. *(.rodata)
  17. }
  18. /* End of text section */
  19. /* Writable data */
  20. .data : {
  21. *(.data)
  22. /* Put the compressed image here */
  23. __image_begin = .;
  24. *(.image)
  25. __image_end = .;
  26. CONSTRUCTORS
  27. }
  28. . = ALIGN(16);
  29. _edata = .;
  30. /* End of data section */
  31. /* BSS */
  32. .bss : {
  33. *(.bss)
  34. }
  35. . = ALIGN(16);
  36. _end = .;
  37. /* Sections to be discarded */
  38. /DISCARD/ : {
  39. *(.MIPS.options)
  40. *(.options)
  41. *(.pdr)
  42. *(.reginfo)
  43. *(.comment)
  44. *(.note)
  45. }
  46. }