linker32.ld 636 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. OUTPUT_ARCH(riscv)
  2. ENTRY(_start)
  3. BASE_ADDRESS = 0x80400000;
  4. SECTIONS
  5. {
  6. /* Load the kernel at this address: "." means the current address */
  7. . = BASE_ADDRESS;
  8. start = .;
  9. .text : ALIGN(4K) {
  10. _stext = .;
  11. *(.text.entry)
  12. *(.text .text.*)
  13. _etext = .;
  14. }
  15. .rodata : ALIGN(4K) {
  16. _srodata = .;
  17. *(.rodata .rodata.*)
  18. _erodata = .;
  19. }
  20. .data : ALIGN(4K) {
  21. _sdata = .;
  22. *(.data .data.*)
  23. _edata = .;
  24. }
  25. .bss (NOLOAD) : ALIGN(4K) {
  26. _sbss = .;
  27. *(.sbss .bss .bss.*)
  28. _ebss = .;
  29. }
  30. PROVIDE(end = .);
  31. }