u-boot.lds 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2017 Andes Technology Corporation
  4. * Rick Chen, Andes Technology Corporation <rick@andestech.com>
  5. */
  6. OUTPUT_ARCH("riscv")
  7. ENTRY(_start)
  8. SECTIONS
  9. {
  10. . = ALIGN(4);
  11. .text : {
  12. arch/riscv/cpu/start.o (.text)
  13. }
  14. /* This needs to come before *(.text*) */
  15. .efi_runtime : {
  16. __efi_runtime_start = .;
  17. *(.text.efi_runtime*)
  18. *(.rodata.efi_runtime*)
  19. *(.data.efi_runtime*)
  20. __efi_runtime_stop = .;
  21. }
  22. .text_rest : {
  23. *(.text*)
  24. }
  25. . = ALIGN(4);
  26. .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  27. . = ALIGN(4);
  28. .data : {
  29. __global_pointer$ = . + 0x800;
  30. *(.data*)
  31. }
  32. . = ALIGN(4);
  33. .got : {
  34. __got_start = .;
  35. *(.got.plt) *(.got)
  36. __got_end = .;
  37. }
  38. . = ALIGN(4);
  39. .u_boot_list : {
  40. KEEP(*(SORT(.u_boot_list*)));
  41. }
  42. . = ALIGN(4);
  43. .efi_runtime_rel : {
  44. __efi_runtime_rel_start = .;
  45. *(.rel*.efi_runtime)
  46. *(.rel*.efi_runtime.*)
  47. __efi_runtime_rel_stop = .;
  48. }
  49. . = ALIGN(4);
  50. /DISCARD/ : { *(.rela.plt*) }
  51. .rela.dyn : {
  52. __rel_dyn_start = .;
  53. *(.rela*)
  54. __rel_dyn_end = .;
  55. }
  56. . = ALIGN(4);
  57. .dynsym : {
  58. __dyn_sym_start = .;
  59. *(.dynsym)
  60. __dyn_sym_end = .;
  61. }
  62. . = ALIGN(4);
  63. _end = .;
  64. .bss : {
  65. __bss_start = .;
  66. *(.bss*)
  67. . = ALIGN(8);
  68. __bss_end = .;
  69. }
  70. }