fw_base.ldS 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. PROVIDE(_fw_start = .);
  11. . = ALIGN(0x1000); /* Need this to create proper sections */
  12. /* Beginning of the code section */
  13. .text :
  14. {
  15. PROVIDE(_text_start = .);
  16. *(.entry)
  17. *(.text)
  18. . = ALIGN(8);
  19. PROVIDE(_text_end = .);
  20. }
  21. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  22. /* End of the code sections */
  23. /* Beginning of the read-only data sections */
  24. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  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. /* Beginning of the read-write data sections */
  34. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  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 = .);