ld.script 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. PHDRS {
  11. text PT_LOAD FLAGS(7); /* RWX */
  12. }
  13. SECTIONS
  14. {
  15. /* Text and read-only data */
  16. /* . = VMLINUZ_LOAD_ADDRESS; */
  17. .text : {
  18. *(.text)
  19. *(.rodata)
  20. }: text
  21. /* End of text section */
  22. /* Writable data */
  23. .data : {
  24. *(.data)
  25. /* Put the compressed image here */
  26. __image_begin = .;
  27. *(.image)
  28. __image_end = .;
  29. CONSTRUCTORS
  30. }
  31. . = ALIGN(16);
  32. _edata = .;
  33. /* End of data section */
  34. /* BSS */
  35. .bss : {
  36. *(.bss)
  37. }
  38. . = ALIGN(16);
  39. _end = .;
  40. /* Sections to be discarded */
  41. /DISCARD/ : {
  42. *(.MIPS.options)
  43. *(.options)
  44. *(.pdr)
  45. *(.reginfo)
  46. *(.comment)
  47. *(.note)
  48. }
  49. }