vmlinux.lds.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. /* bootloader code and data starts at least behind area of extracted kernel */
  40. . = MAX(ABSOLUTE(.), (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START));
  41. /* align on next page boundary */
  42. . = ALIGN(4096);
  43. .text : {
  44. _text = .; /* Text */
  45. *(.text)
  46. *(.text.*)
  47. _etext = . ;
  48. }
  49. . = ALIGN(8);
  50. .data : {
  51. _data = . ;
  52. *(.data)
  53. *(.data.*)
  54. _edata = . ;
  55. }
  56. . = ALIGN(8);
  57. .rodata : {
  58. _rodata = . ;
  59. *(.rodata) /* read-only data */
  60. *(.rodata.*)
  61. _erodata = . ;
  62. }
  63. . = ALIGN(8);
  64. .rodata.compressed : {
  65. *(.rodata.compressed)
  66. }
  67. . = ALIGN(8);
  68. .bss : {
  69. _bss = . ;
  70. *(.bss)
  71. *(.bss.*)
  72. *(COMMON)
  73. . = ALIGN(4096);
  74. _ebss = .;
  75. }
  76. STABS_DEBUG
  77. .note 0 : { *(.note) }
  78. /* Sections to be discarded */
  79. DISCARDS
  80. /DISCARD/ : {
  81. #ifdef CONFIG_64BIT
  82. /* temporary hack until binutils is fixed to not emit these
  83. * for static binaries
  84. */
  85. *(.PARISC.unwind) /* no unwind data */
  86. *(.interp)
  87. *(.dynsym)
  88. *(.dynstr)
  89. *(.dynamic)
  90. *(.hash)
  91. *(.gnu.hash)
  92. #endif
  93. }
  94. }