fw_base.ldS 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2019 Western Digital Corporation or its affiliates.
  5. *
  6. * Authors:
  7. * Anup Patel <anup.patel@wdc.com>
  8. */
  9. . = FW_TEXT_START;
  10. /* Don't add any section between FW_TEXT_START and _fw_start */
  11. PROVIDE(_fw_start = .);
  12. . = ALIGN(0x1000); /* Need this to create proper sections */
  13. /* Beginning of the code section */
  14. .text :
  15. {
  16. PROVIDE(_text_start = .);
  17. *(.entry)
  18. *(.text)
  19. . = ALIGN(8);
  20. PROVIDE(_text_end = .);
  21. }
  22. /* End of the code sections */
  23. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  24. /* Beginning of the read-only data sections */
  25. .rodata :
  26. {
  27. PROVIDE(_rodata_start = .);
  28. *(.rodata .rodata.*)
  29. . = ALIGN(8);
  30. PROVIDE(_rodata_end = .);
  31. }
  32. /* End of the read-only data sections */
  33. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  34. /* Beginning of the read-write data sections */
  35. .data :
  36. {
  37. PROVIDE(_data_start = .);
  38. *(.sdata)
  39. *(.sdata.*)
  40. *(.data)
  41. *(.data.*)
  42. *(.readmostly.data)
  43. *(*.data)
  44. . = ALIGN(8);
  45. PROVIDE(_data_end = .);
  46. }
  47. .dynsym : {
  48. PROVIDE(__dyn_sym_start = .);
  49. *(.dynsym)
  50. PROVIDE(__dyn_sym_end = .);
  51. }
  52. .rela.dyn : {
  53. PROVIDE(__rel_dyn_start = .);
  54. *(.rela*)
  55. . = ALIGN(8);
  56. PROVIDE(__rel_dyn_end = .);
  57. }
  58. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  59. .bss :
  60. {
  61. PROVIDE(_bss_start = .);
  62. *(.sbss)
  63. *(.sbss.*)
  64. *(.bss)
  65. *(.bss.*)
  66. . = ALIGN(8);
  67. PROVIDE(_bss_end = .);
  68. }
  69. /* End of the read-write data sections */
  70. . = ALIGN(0x1000); /* Need this to create proper sections */
  71. PROVIDE(_fw_end = .);