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. /* 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. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  23. /* End of the code sections */
  24. /* Beginning of the read-only data sections */
  25. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  26. .rodata :
  27. {
  28. PROVIDE(_rodata_start = .);
  29. *(.rodata .rodata.*)
  30. . = ALIGN(8);
  31. PROVIDE(_rodata_end = .);
  32. }
  33. /* End of the read-only data sections */
  34. /* Beginning of the read-write data sections */
  35. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  36. .data :
  37. {
  38. PROVIDE(_data_start = .);
  39. *(.sdata)
  40. *(.sdata.*)
  41. *(.data)
  42. *(.data.*)
  43. *(.readmostly.data)
  44. *(*.data)
  45. . = ALIGN(8);
  46. PROVIDE(_data_end = .);
  47. }
  48. .dynsym : {
  49. PROVIDE(__dyn_sym_start = .);
  50. *(.dynsym)
  51. PROVIDE(__dyn_sym_end = .);
  52. }
  53. .rela.dyn : {
  54. PROVIDE(__rel_dyn_start = .);
  55. *(.rela*)
  56. . = ALIGN(8);
  57. PROVIDE(__rel_dyn_end = .);
  58. }
  59. . = ALIGN(0x1000); /* Ensure next section is page aligned */
  60. .bss :
  61. {
  62. PROVIDE(_bss_start = .);
  63. *(.sbss)
  64. *(.sbss.*)
  65. *(.bss)
  66. *(.bss.*)
  67. . = ALIGN(8);
  68. PROVIDE(_bss_end = .);
  69. }
  70. /* End of the read-write data sections */
  71. . = ALIGN(0x1000); /* Need this to create proper sections */
  72. PROVIDE(_fw_end = .);