ld.script 902 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. . = ALIGN(16);
  31. }
  32. __appended_dtb = .;
  33. /* leave space for appended DTB */
  34. . += 0x100000;
  35. _edata = .;
  36. /* End of data section */
  37. /* BSS */
  38. .bss : {
  39. *(.bss)
  40. }
  41. . = ALIGN(16);
  42. _end = .;
  43. /* Sections to be discarded */
  44. /DISCARD/ : {
  45. *(.MIPS.options)
  46. *(.options)
  47. *(.pdr)
  48. *(.reginfo)
  49. *(.comment)
  50. *(.note)
  51. }
  52. }