u-boot.lds 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. *(.data*)
  30. }
  31. . = ALIGN(4);
  32. .got : {
  33. __got_start = .;
  34. *(.got.plt) *(.got)
  35. __got_end = .;
  36. }
  37. . = ALIGN(4);
  38. .u_boot_list : {
  39. KEEP(*(SORT(.u_boot_list*)));
  40. }
  41. . = ALIGN(4);
  42. .efi_runtime_rel : {
  43. __efi_runtime_rel_start = .;
  44. *(.rel*.efi_runtime)
  45. *(.rel*.efi_runtime.*)
  46. __efi_runtime_rel_stop = .;
  47. }
  48. . = ALIGN(4);
  49. /DISCARD/ : { *(.rela.plt*) }
  50. .rela.dyn : {
  51. __rel_dyn_start = .;
  52. *(.rela*)
  53. __rel_dyn_end = .;
  54. }
  55. . = ALIGN(4);
  56. .dynsym : {
  57. __dyn_sym_start = .;
  58. *(.dynsym)
  59. __dyn_sym_end = .;
  60. }
  61. . = ALIGN(4);
  62. _end = .;
  63. .bss : {
  64. __bss_start = .;
  65. *(.bss*)
  66. . = ALIGN(8);
  67. __bss_end = .;
  68. }
  69. }