ld.script 928 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * ld.script for compressed kernel support of MIPS
  3. *
  4. * Copyright (C) 2009 Lemote Inc.
  5. * Author: Wu Zhangjin <[email protected]>
  6. * Copyright (C) 2010 "Wu Zhangjin" <[email protected]>
  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. __appended_dtb = .;
  34. /* leave space for appended DTB */
  35. . += 0x100000;
  36. }
  37. _edata = .;
  38. /* End of data section */
  39. /* BSS */
  40. .bss : {
  41. *(.bss)
  42. }
  43. . = ALIGN(16);
  44. _end = .;
  45. /* Sections to be discarded */
  46. /DISCARD/ : {
  47. *(.MIPS.options)
  48. *(.options)
  49. *(.pdr)
  50. *(.reginfo)
  51. *(.comment)
  52. *(.note)
  53. }
  54. }