فهرست منبع

sections_ld: add description to .flash.rodata_noload

This commit also move _rodata_reserved_end symbol right at the entry of
the .flash.rodata_noload.
Armando 3 سال پیش
والد
کامیت
4c878eeb0a

+ 9 - 1
components/esp_system/ld/esp32/sections.ld.in

@@ -324,11 +324,19 @@ SECTIONS
 
   _flash_rodata_align = ALIGNOF(.flash.rodata);
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
     mapping[rodata_noload]
-    _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   .flash.text :

+ 9 - 1
components/esp_system/ld/esp32c2/sections.ld.in

@@ -245,11 +245,19 @@ SECTIONS
     __eh_frame_hdr_end = ABSOLUTE(.);
   } > default_rodata_seg
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
     mapping[rodata_noload]
-    _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   /* Marks the end of IRAM code segment */

+ 9 - 1
components/esp_system/ld/esp32c3/sections.ld.in

@@ -355,11 +355,19 @@ SECTIONS
     __eh_frame_hdr_end = ABSOLUTE(.);
   } > default_rodata_seg
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
     mapping[rodata_noload]
-    _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   /* Marks the end of IRAM code segment */

+ 9 - 1
components/esp_system/ld/esp32c6/sections.ld.in

@@ -388,11 +388,19 @@ SECTIONS
     __eh_frame_hdr_end = ABSOLUTE(.);
   } > default_rodata_seg
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
     mapping[rodata_noload]
-   _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   /* Marks the end of data, bss and possibly rodata  */

+ 9 - 2
components/esp_system/ld/esp32h4/sections.ld.in

@@ -358,11 +358,18 @@ SECTIONS
     __eh_frame_hdr_end = ABSOLUTE(.);
   } > default_rodata_seg
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
-    /* Empty for now, only a container for `_rodata_reserved_end` symbol, add needed rodata noload mappings here if needed */
-    _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   /* Marks the end of IRAM code segment */

+ 9 - 1
components/esp_system/ld/esp32s2/sections.ld.in

@@ -340,11 +340,19 @@ SECTIONS
 
   _flash_rodata_align = ALIGNOF(.flash.rodata);
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
     mapping[rodata_noload]
-    _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   .flash.text :

+ 9 - 1
components/esp_system/ld/esp32s3/sections.ld.in

@@ -366,11 +366,19 @@ SECTIONS
 
   _flash_rodata_align = ALIGNOF(.flash.rodata);
 
+  /*
+    This section is a place where we dump all the rodata which aren't used at runtime,
+    so as to avoid binary size increase
+  */
   .flash.rodata_noload (NOLOAD) :
   {
+    /*
+      This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address
+      We don't need to include the noload rodata in this section
+    */
+    _rodata_reserved_end = ABSOLUTE(.);
     . = ALIGN (4);
     mapping[rodata_noload]
-    _rodata_reserved_end = ABSOLUTE(.);  /* This is a symbol marking the flash.rodata end, this can be used for mmu driver to maintain virtual address */
   } > default_rodata_seg
 
   /**