vmlinux.lds.S 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2009 Thomas Chou <thomas@wytron.com.tw>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. */
  18. #include <asm-generic/vmlinux.lds.h>
  19. OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2")
  20. OUTPUT_ARCH(nios)
  21. ENTRY(_start) /* Defined in head.S */
  22. SECTIONS
  23. {
  24. . = (CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_BOOT_LINK_OFFSET) | \
  25. CONFIG_NIOS2_KERNEL_REGION_BASE;
  26. _text = .;
  27. .text : { *(.text) } = 0
  28. .rodata : { *(.rodata) *(.rodata.*) }
  29. _etext = .;
  30. . = ALIGN(32 / 8);
  31. .data : { *(.data) }
  32. . = ALIGN(32 / 8);
  33. _got = .;
  34. .got : {
  35. *(.got.plt)
  36. *(.igot.plt)
  37. *(.got)
  38. *(.igot)
  39. }
  40. _egot = .;
  41. _edata = .;
  42. . = ALIGN(32 / 8);
  43. __bss_start = .;
  44. .bss : { *(.bss) *(.sbss) }
  45. . = ALIGN(32 / 8);
  46. _ebss = .;
  47. end = . ;
  48. _end = . ;
  49. got_len = (_egot - _got);
  50. }