vmlinux.lds.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #include <asm-generic/vmlinux.lds.h>
  2. #include <asm/page.h>
  3. #include "sizes.h"
  4. #ifndef CONFIG_64BIT
  5. OUTPUT_FORMAT("elf32-hppa-linux")
  6. OUTPUT_ARCH(hppa)
  7. #else
  8. OUTPUT_FORMAT("elf64-hppa-linux")
  9. OUTPUT_ARCH(hppa:hppa2.0w)
  10. #endif
  11. ENTRY(startup)
  12. SECTIONS
  13. {
  14. /* palo loads at 0x60000 */
  15. /* loaded kernel will move to 0x10000 */
  16. . = 0xe0000; /* should not overwrite palo code */
  17. .head.text : {
  18. _head = . ;
  19. HEAD_TEXT
  20. _ehead = . ;
  21. }
  22. /* keep __gp below 0x1000000 */
  23. #ifdef CONFIG_64BIT
  24. . = ALIGN(16);
  25. /* Linkage tables */
  26. .opd : {
  27. __start_opd = .;
  28. *(.opd)
  29. __end_opd = .;
  30. } PROVIDE (__gp = .);
  31. .plt : {
  32. *(.plt)
  33. }
  34. .dlt : {
  35. *(.dlt)
  36. }
  37. #endif
  38. _startcode_end = .;
  39. /* vmlinux.bin.gz is here */
  40. . = ALIGN(8);
  41. .rodata.compressed : {
  42. *(.rodata.compressed)
  43. }
  44. /* bootloader code and data starts at least behind area of extracted kernel */
  45. . = MAX(ABSOLUTE(.), (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START));
  46. /* align on next page boundary */
  47. . = ALIGN(4096);
  48. .text : {
  49. _text = .; /* Text */
  50. *(.text)
  51. *(.text.*)
  52. _etext = . ;
  53. }
  54. . = ALIGN(8);
  55. .data : {
  56. _data = . ;
  57. *(.data)
  58. *(.data.*)
  59. _edata = . ;
  60. }
  61. . = ALIGN(8);
  62. .rodata : {
  63. _rodata = . ;
  64. *(.rodata) /* read-only data */
  65. *(.rodata.*)
  66. _erodata = . ;
  67. }
  68. . = ALIGN(8);
  69. .bss : {
  70. _bss = . ;
  71. *(.bss)
  72. *(.bss.*)
  73. *(COMMON)
  74. . = ALIGN(4096);
  75. _ebss = .;
  76. }
  77. STABS_DEBUG
  78. ELF_DETAILS
  79. .note 0 : { *(.note) }
  80. /* Sections to be discarded */
  81. DISCARDS
  82. /DISCARD/ : {
  83. #ifdef CONFIG_64BIT
  84. /* temporary hack until binutils is fixed to not emit these
  85. * for static binaries
  86. */
  87. *(.PARISC.unwind) /* no unwind data */
  88. *(.interp)
  89. *(.dynsym)
  90. *(.dynstr)
  91. *(.dynamic)
  92. *(.hash)
  93. *(.gnu.hash)
  94. #endif
  95. }
  96. }