[PATCH 1/3] bsps: Sort .noinit* sections

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 14 13:13:00 UTC 2022


Sort the .noinit* input sections by name first, then by alignment if two
sections have the same name.  This allows the placement of begin/end symbols to
initialize some areas with a special value.
---
 bsps/aarch64/shared/start/linkcmds.base          | 2 +-
 bsps/arm/shared/start/linkcmds.base              | 2 +-
 bsps/bfin/TLL6527M/start/linkcmds                | 2 +-
 bsps/bfin/bf537Stamp/start/linkcmds              | 2 +-
 bsps/bfin/eZKit533/start/linkcmds                | 2 +-
 bsps/i386/pc386/start/linkcmds                   | 2 +-
 bsps/lm32/lm32_evr/start/linkcmds                | 2 +-
 bsps/lm32/milkymist/start/linkcmds               | 2 +-
 bsps/m68k/av5282/start/linkcmds                  | 2 +-
 bsps/m68k/av5282/start/linkcmdsflash             | 2 +-
 bsps/m68k/av5282/start/linkcmdsram               | 2 +-
 bsps/m68k/csb360/start/linkcmds                  | 2 +-
 bsps/m68k/gen68340/start/linkcmds                | 2 +-
 bsps/m68k/gen68360/start/linkcmds                | 2 +-
 bsps/m68k/gen68360/start/linkcmds.bootp          | 2 +-
 bsps/m68k/gen68360/start/linkcmds.prom           | 2 +-
 bsps/m68k/mcf5206elite/start/linkcmds            | 2 +-
 bsps/m68k/mcf5206elite/start/linkcmds.flash      | 2 +-
 bsps/m68k/mcf52235/start/linkcmds                | 2 +-
 bsps/m68k/mcf5225x/start/linkcmds                | 2 +-
 bsps/m68k/mcf5235/start/linkcmds                 | 2 +-
 bsps/m68k/mcf5235/start/linkcmdsflash            | 2 +-
 bsps/m68k/mcf5235/start/linkcmdsram              | 2 +-
 bsps/m68k/mcf5329/start/linkcmds                 | 2 +-
 bsps/m68k/mcf5329/start/linkcmdsflash            | 2 +-
 bsps/m68k/mrm332/start/linkcmds                  | 2 +-
 bsps/m68k/shared/start/linkcmds.base             | 2 +-
 bsps/m68k/uC5282/start/linkcmds                  | 2 +-
 bsps/mips/csb350/start/linkcmds                  | 2 +-
 bsps/mips/hurricane/start/linkcmds               | 2 +-
 bsps/mips/jmr3904/start/linkcmds                 | 2 +-
 bsps/mips/malta/start/linkcmds                   | 2 +-
 bsps/mips/rbtx4925/start/linkcmds                | 2 +-
 bsps/mips/rbtx4938/start/linkcmds                | 2 +-
 bsps/moxie/moxiesim/start/linkcmds               | 2 +-
 bsps/nios2/nios2_iss/start/linkcmds              | 2 +-
 bsps/or1k/shared/start/linkcmds.base             | 2 +-
 bsps/powerpc/gen5200/start/linkcmds.gen5200_base | 2 +-
 bsps/powerpc/mpc8260ads/start/linkcmds           | 2 +-
 bsps/powerpc/shared/start/linkcmds.base          | 2 +-
 bsps/powerpc/shared/start/linkcmds.share         | 2 +-
 bsps/powerpc/ss555/start/linkcmds                | 2 +-
 bsps/powerpc/virtex4/start/linkcmds              | 2 +-
 bsps/powerpc/virtex5/start/linkcmds              | 2 +-
 bsps/sh/gensh1/start/linkcmds                    | 2 +-
 bsps/sh/gensh2/start/linkcmds                    | 2 +-
 bsps/sh/gensh2/start/linkcmds.ram                | 2 +-
 bsps/sh/gensh2/start/linkcmds.rom                | 2 +-
 bsps/sh/gensh4/start/linkcmds                    | 2 +-
 bsps/sh/gensh4/start/linkcmds.rom                | 2 +-
 bsps/sh/gensh4/start/linkcmds.rom2ram            | 2 +-
 bsps/sh/shsim/start/linkcmds                     | 2 +-
 bsps/sparc/shared/start/linkcmds.base            | 2 +-
 bsps/sparc64/shared/start/linkcmds               | 2 +-
 bsps/v850/gdbv850sim/start/linkcmds              | 2 +-
 bsps/x86_64/amd64/start/linkcmds                 | 2 +-
 56 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/bsps/aarch64/shared/start/linkcmds.base b/bsps/aarch64/shared/start/linkcmds.base
index d3b5485777..bcdf4715d7 100644
--- a/bsps/aarch64/shared/start/linkcmds.base
+++ b/bsps/aarch64/shared/start/linkcmds.base
@@ -323,7 +323,7 @@ SECTIONS {
 
 	.noinit (NOLOAD) : ALIGN_WITH_INPUT {
 		bsp_section_noinit_begin = .;
-		*(.noinit*)
+		*(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
 		bsp_section_noinit_end = .;
 	} > REGION_WORK AT > REGION_WORK
 	bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin;
diff --git a/bsps/arm/shared/start/linkcmds.base b/bsps/arm/shared/start/linkcmds.base
index 10d2c54028..c9cf360ee7 100644
--- a/bsps/arm/shared/start/linkcmds.base
+++ b/bsps/arm/shared/start/linkcmds.base
@@ -334,7 +334,7 @@ SECTIONS {
 
 	.noinit (NOLOAD) : ALIGN_WITH_INPUT {
 		bsp_section_noinit_begin = .;
-		*(.noinit*)
+		*(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
 		bsp_section_noinit_end = .;
 	} > REGION_WORK AT > REGION_WORK
 	bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin;
diff --git a/bsps/bfin/TLL6527M/start/linkcmds b/bsps/bfin/TLL6527M/start/linkcmds
index 315f1b7149..2185678184 100644
--- a/bsps/bfin/TLL6527M/start/linkcmds
+++ b/bsps/bfin/TLL6527M/start/linkcmds
@@ -129,7 +129,7 @@ SECTIONS
     } > sdram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } > sdram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/bfin/bf537Stamp/start/linkcmds b/bsps/bfin/bf537Stamp/start/linkcmds
index c6bbcf4e68..8747fe090f 100644
--- a/bsps/bfin/bf537Stamp/start/linkcmds
+++ b/bsps/bfin/bf537Stamp/start/linkcmds
@@ -137,7 +137,7 @@ SECTIONS
     } > sdram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } > sdram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/bfin/eZKit533/start/linkcmds b/bsps/bfin/eZKit533/start/linkcmds
index 6f338b0b3a..b473e8c1b0 100644
--- a/bsps/bfin/eZKit533/start/linkcmds
+++ b/bsps/bfin/eZKit533/start/linkcmds
@@ -126,7 +126,7 @@ SECTIONS
     } > sdram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } > sdram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/i386/pc386/start/linkcmds b/bsps/i386/pc386/start/linkcmds
index 46a7af4cb9..f11f94cecd 100644
--- a/bsps/i386/pc386/start/linkcmds
+++ b/bsps/i386/pc386/start/linkcmds
@@ -206,7 +206,7 @@ SECTIONS
   . = ALIGN(32 / 8);
   _end = .; PROVIDE (end = .);
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
   .rtemsstack (NOLOAD) : {
     *(SORT(.rtemsstack.*))
diff --git a/bsps/lm32/lm32_evr/start/linkcmds b/bsps/lm32/lm32_evr/start/linkcmds
index dd429a7af1..49e11bac79 100644
--- a/bsps/lm32/lm32_evr/start/linkcmds
+++ b/bsps/lm32/lm32_evr/start/linkcmds
@@ -254,7 +254,7 @@ SECTIONS
   } > sdram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > sdram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/lm32/milkymist/start/linkcmds b/bsps/lm32/milkymist/start/linkcmds
index 021814a7b5..fde44adce1 100644
--- a/bsps/lm32/milkymist/start/linkcmds
+++ b/bsps/lm32/milkymist/start/linkcmds
@@ -252,7 +252,7 @@ SECTIONS
   } > sdram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > sdram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/av5282/start/linkcmds b/bsps/m68k/av5282/start/linkcmds
index e74c30c7b6..79a427511c 100644
--- a/bsps/m68k/av5282/start/linkcmds
+++ b/bsps/m68k/av5282/start/linkcmds
@@ -203,7 +203,7 @@ SECTIONS
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } >ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/av5282/start/linkcmdsflash b/bsps/m68k/av5282/start/linkcmdsflash
index b7670e5134..48ec1c960f 100644
--- a/bsps/m68k/av5282/start/linkcmdsflash
+++ b/bsps/m68k/av5282/start/linkcmdsflash
@@ -203,7 +203,7 @@ SECTIONS
         }
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         }
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/av5282/start/linkcmdsram b/bsps/m68k/av5282/start/linkcmdsram
index a28c402eaa..e2139723d4 100644
--- a/bsps/m68k/av5282/start/linkcmdsram
+++ b/bsps/m68k/av5282/start/linkcmdsram
@@ -202,7 +202,7 @@ SECTIONS
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } >ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/csb360/start/linkcmds b/bsps/m68k/csb360/start/linkcmds
index 430f122e3d..35d501257c 100644
--- a/bsps/m68k/csb360/start/linkcmds
+++ b/bsps/m68k/csb360/start/linkcmds
@@ -159,7 +159,7 @@ SECTIONS
   } > ram
 
   .noinit (NOLOAD) : {
-       *(.noinit*)
+       *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } >ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/gen68340/start/linkcmds b/bsps/m68k/gen68340/start/linkcmds
index a480084b83..a18b0343fb 100644
--- a/bsps/m68k/gen68340/start/linkcmds
+++ b/bsps/m68k/gen68340/start/linkcmds
@@ -190,7 +190,7 @@ SECTIONS {
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } >ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/gen68360/start/linkcmds b/bsps/m68k/gen68360/start/linkcmds
index 0bf9efa9ea..7376ce070c 100644
--- a/bsps/m68k/gen68360/start/linkcmds
+++ b/bsps/m68k/gen68360/start/linkcmds
@@ -154,7 +154,7 @@ SECTIONS {
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } > ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/gen68360/start/linkcmds.bootp b/bsps/m68k/gen68360/start/linkcmds.bootp
index 422396f766..4bca5aab54 100644
--- a/bsps/m68k/gen68360/start/linkcmds.bootp
+++ b/bsps/m68k/gen68360/start/linkcmds.bootp
@@ -156,7 +156,7 @@ SECTIONS {
         } >myram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } >mvram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/gen68360/start/linkcmds.prom b/bsps/m68k/gen68360/start/linkcmds.prom
index da8acdf376..c5c96228a4 100644
--- a/bsps/m68k/gen68360/start/linkcmds.prom
+++ b/bsps/m68k/gen68360/start/linkcmds.prom
@@ -154,7 +154,7 @@ SECTIONS {
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } > ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5206elite/start/linkcmds b/bsps/m68k/mcf5206elite/start/linkcmds
index 89325cda8b..def951989e 100644
--- a/bsps/m68k/mcf5206elite/start/linkcmds
+++ b/bsps/m68k/mcf5206elite/start/linkcmds
@@ -192,7 +192,7 @@ SECTIONS
   } > ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } >ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5206elite/start/linkcmds.flash b/bsps/m68k/mcf5206elite/start/linkcmds.flash
index cf1e5ed720..6d357563e5 100644
--- a/bsps/m68k/mcf5206elite/start/linkcmds.flash
+++ b/bsps/m68k/mcf5206elite/start/linkcmds.flash
@@ -191,7 +191,7 @@ SECTIONS
   } > ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } >ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf52235/start/linkcmds b/bsps/m68k/mcf52235/start/linkcmds
index efe48117d0..7e212c13d0 100644
--- a/bsps/m68k/mcf52235/start/linkcmds
+++ b/bsps/m68k/mcf52235/start/linkcmds
@@ -191,7 +191,7 @@ SECTIONS
     } >sram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } >sram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5225x/start/linkcmds b/bsps/m68k/mcf5225x/start/linkcmds
index fc1aa1a107..51f34b29f3 100644
--- a/bsps/m68k/mcf5225x/start/linkcmds
+++ b/bsps/m68k/mcf5225x/start/linkcmds
@@ -191,7 +191,7 @@ SECTIONS
     } >sram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } >sram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5235/start/linkcmds b/bsps/m68k/mcf5235/start/linkcmds
index 9cdddcd38f..2e21c459f3 100644
--- a/bsps/m68k/mcf5235/start/linkcmds
+++ b/bsps/m68k/mcf5235/start/linkcmds
@@ -210,7 +210,7 @@ SECTIONS
         } > dram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } > dram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5235/start/linkcmdsflash b/bsps/m68k/mcf5235/start/linkcmdsflash
index 7e796ceaff..f783ca1b59 100644
--- a/bsps/m68k/mcf5235/start/linkcmdsflash
+++ b/bsps/m68k/mcf5235/start/linkcmdsflash
@@ -215,7 +215,7 @@ SECTIONS
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } > ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5235/start/linkcmdsram b/bsps/m68k/mcf5235/start/linkcmdsram
index 057da6745f..e44e04baf3 100644
--- a/bsps/m68k/mcf5235/start/linkcmdsram
+++ b/bsps/m68k/mcf5235/start/linkcmdsram
@@ -210,7 +210,7 @@ SECTIONS
         } >ram
 
         .noinit (NOLOAD) : {
-                *(.noinit*)
+                *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         } > ram
 
         .rtemsstack (NOLOAD) : {
diff --git a/bsps/m68k/mcf5329/start/linkcmds b/bsps/m68k/mcf5329/start/linkcmds
index 1578dc6c60..4c052575b8 100644
--- a/bsps/m68k/mcf5329/start/linkcmds
+++ b/bsps/m68k/mcf5329/start/linkcmds
@@ -201,7 +201,7 @@ SECTIONS
     } > dram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         WorkAreaBase = .;
     } > dram
 
diff --git a/bsps/m68k/mcf5329/start/linkcmdsflash b/bsps/m68k/mcf5329/start/linkcmdsflash
index 437852b7e4..dd97ed81d0 100644
--- a/bsps/m68k/mcf5329/start/linkcmdsflash
+++ b/bsps/m68k/mcf5329/start/linkcmdsflash
@@ -197,7 +197,7 @@ SECTIONS
     } > dram
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
         WorkAreaBase = .;
     } > dram
 
diff --git a/bsps/m68k/mrm332/start/linkcmds b/bsps/m68k/mrm332/start/linkcmds
index 3ae0d027bd..4123cb986b 100644
--- a/bsps/m68k/mrm332/start/linkcmds
+++ b/bsps/m68k/mrm332/start/linkcmds
@@ -191,7 +191,7 @@ SECTIONS
     _clear_end = .;
   } > ram
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
   .rtemsstack (NOLOAD) : {
     *(SORT(.rtemsstack.*))
diff --git a/bsps/m68k/shared/start/linkcmds.base b/bsps/m68k/shared/start/linkcmds.base
index 5626293874..66987c0b19 100644
--- a/bsps/m68k/shared/start/linkcmds.base
+++ b/bsps/m68k/shared/start/linkcmds.base
@@ -264,7 +264,7 @@ SECTIONS {
 
 	.noinit (NOLOAD) : ALIGN_WITH_INPUT {
 		bsp_section_noinit_begin = .;
-		*(.noinit*)
+		*(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
 		bsp_section_noinit_end = .;
 	} > REGION_DATA AT > REGION_DATA
 	bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin;
diff --git a/bsps/m68k/uC5282/start/linkcmds b/bsps/m68k/uC5282/start/linkcmds
index 6e08184120..a171cba284 100644
--- a/bsps/m68k/uC5282/start/linkcmds
+++ b/bsps/m68k/uC5282/start/linkcmds
@@ -206,7 +206,7 @@ SECTIONS
     } >ram
 
     .noinit (NOLOAD) : {
-       *(.noinit*)
+       *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } >ram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/mips/csb350/start/linkcmds b/bsps/mips/csb350/start/linkcmds
index 56748b48fa..9eb995bbd3 100644
--- a/bsps/mips/csb350/start/linkcmds
+++ b/bsps/mips/csb350/start/linkcmds
@@ -193,7 +193,7 @@ SECTIONS
   } >ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } >ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/mips/hurricane/start/linkcmds b/bsps/mips/hurricane/start/linkcmds
index 383c3f2cb3..dee1d606a8 100644
--- a/bsps/mips/hurricane/start/linkcmds
+++ b/bsps/mips/hurricane/start/linkcmds
@@ -171,7 +171,7 @@ SECTIONS
   }
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/mips/jmr3904/start/linkcmds b/bsps/mips/jmr3904/start/linkcmds
index 2ded55b786..b84360f17b 100644
--- a/bsps/mips/jmr3904/start/linkcmds
+++ b/bsps/mips/jmr3904/start/linkcmds
@@ -168,7 +168,7 @@ SECTIONS
   }
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/mips/malta/start/linkcmds b/bsps/mips/malta/start/linkcmds
index 233082e691..9a31611e1e 100644
--- a/bsps/mips/malta/start/linkcmds
+++ b/bsps/mips/malta/start/linkcmds
@@ -169,7 +169,7 @@ SECTIONS
   }
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/mips/rbtx4925/start/linkcmds b/bsps/mips/rbtx4925/start/linkcmds
index 2fa62a4b0c..4ca7dc22a6 100644
--- a/bsps/mips/rbtx4925/start/linkcmds
+++ b/bsps/mips/rbtx4925/start/linkcmds
@@ -171,7 +171,7 @@ SECTIONS
   }
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/mips/rbtx4938/start/linkcmds b/bsps/mips/rbtx4938/start/linkcmds
index f298db0513..292c4056de 100644
--- a/bsps/mips/rbtx4938/start/linkcmds
+++ b/bsps/mips/rbtx4938/start/linkcmds
@@ -171,7 +171,7 @@ SECTIONS
   }
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/moxie/moxiesim/start/linkcmds b/bsps/moxie/moxiesim/start/linkcmds
index e49aece385..2cfaa86fdd 100644
--- a/bsps/moxie/moxiesim/start/linkcmds
+++ b/bsps/moxie/moxiesim/start/linkcmds
@@ -231,7 +231,7 @@ SECTIONS
   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
   PROVIDE (end = .);
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
   .rtemsstack (NOLOAD) : {
     *(SORT(.rtemsstack.*))
diff --git a/bsps/nios2/nios2_iss/start/linkcmds b/bsps/nios2/nios2_iss/start/linkcmds
index 0aed732ee2..8ea38b5015 100644
--- a/bsps/nios2/nios2_iss/start/linkcmds
+++ b/bsps/nios2/nios2_iss/start/linkcmds
@@ -268,7 +268,7 @@ SECTIONS
     } > onchip_memory_0
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } > onchip_memory_0
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/or1k/shared/start/linkcmds.base b/bsps/or1k/shared/start/linkcmds.base
index c276e13cb2..dbb9cee0e5 100644
--- a/bsps/or1k/shared/start/linkcmds.base
+++ b/bsps/or1k/shared/start/linkcmds.base
@@ -287,7 +287,7 @@ SECTIONS {
 
   .noinit (NOLOAD) : ALIGN_WITH_INPUT {
     bsp_section_noinit_begin = .;
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     bsp_section_noinit_end = .;
   } > REGION_BSS AT > REGION_BSS
   bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin;
diff --git a/bsps/powerpc/gen5200/start/linkcmds.gen5200_base b/bsps/powerpc/gen5200/start/linkcmds.gen5200_base
index bfa38939b8..ecf33f3fe2 100644
--- a/bsps/powerpc/gen5200/start/linkcmds.gen5200_base
+++ b/bsps/powerpc/gen5200/start/linkcmds.gen5200_base
@@ -296,7 +296,7 @@ SECTIONS {
 	bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_start;
 
 	.noinit (NOLOAD) : {
-		*(.noinit*)
+		*(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
 	} > RAM
 
 	.rtemsstack (NOLOAD) : {
diff --git a/bsps/powerpc/mpc8260ads/start/linkcmds b/bsps/powerpc/mpc8260ads/start/linkcmds
index 024fc34edc..78d799a0f4 100644
--- a/bsps/powerpc/mpc8260ads/start/linkcmds
+++ b/bsps/powerpc/mpc8260ads/start/linkcmds
@@ -290,7 +290,7 @@ SECTIONS
     clear_end = .;
 
     .noinit (NOLOAD) : {
-        *(.noinit*)
+        *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
     } >ram
 
     .rtemsstack (NOLOAD) : {
diff --git a/bsps/powerpc/shared/start/linkcmds.base b/bsps/powerpc/shared/start/linkcmds.base
index a3a1b1108a..21fa729e38 100644
--- a/bsps/powerpc/shared/start/linkcmds.base
+++ b/bsps/powerpc/shared/start/linkcmds.base
@@ -358,7 +358,7 @@ SECTIONS {
 
 	.noinit (NOLOAD) : ALIGN_WITH_INPUT {
 		bsp_section_noinit_begin = .;
-		*(.noinit*)
+		*(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
 		bsp_section_noinit_end = .;
 	} > REGION_WORK AT > REGION_WORK
 	bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin;
diff --git a/bsps/powerpc/shared/start/linkcmds.share b/bsps/powerpc/shared/start/linkcmds.share
index 86b02cb18e..bb799720ce 100644
--- a/bsps/powerpc/shared/start/linkcmds.share
+++ b/bsps/powerpc/shared/start/linkcmds.share
@@ -254,7 +254,7 @@ SECTIONS
    PROVIDE (__bss_end = .);
   } > CODE
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > CODE
   .rtemsstack (NOLOAD) : {
     *(SORT(.rtemsstack.*))
diff --git a/bsps/powerpc/ss555/start/linkcmds b/bsps/powerpc/ss555/start/linkcmds
index 18e8d34dd1..09ab05ab53 100644
--- a/bsps/powerpc/ss555/start/linkcmds
+++ b/bsps/powerpc/ss555/start/linkcmds
@@ -234,7 +234,7 @@ SECTIONS
   PROVIDE(_end = bss.end);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/powerpc/virtex4/start/linkcmds b/bsps/powerpc/virtex4/start/linkcmds
index ff61396710..e053cf5aeb 100644
--- a/bsps/powerpc/virtex4/start/linkcmds
+++ b/bsps/powerpc/virtex4/start/linkcmds
@@ -253,7 +253,7 @@ SECTIONS
   PROVIDE(__bsp_ram_start = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } >RAM
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/powerpc/virtex5/start/linkcmds b/bsps/powerpc/virtex5/start/linkcmds
index ca81d57fde..15af537066 100644
--- a/bsps/powerpc/virtex5/start/linkcmds
+++ b/bsps/powerpc/virtex5/start/linkcmds
@@ -253,7 +253,7 @@ SECTIONS
   PROVIDE(__bsp_ram_start = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } >RAM
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/sh/gensh1/start/linkcmds b/bsps/sh/gensh1/start/linkcmds
index fc06126941..d76f52ed61 100644
--- a/bsps/sh/gensh1/start/linkcmds
+++ b/bsps/sh/gensh1/start/linkcmds
@@ -188,7 +188,7 @@ SECTIONS
   PROVIDE (end = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstackidle (NOLOAD) : {
diff --git a/bsps/sh/gensh2/start/linkcmds b/bsps/sh/gensh2/start/linkcmds
index bdc71bb984..e06932a053 100644
--- a/bsps/sh/gensh2/start/linkcmds
+++ b/bsps/sh/gensh2/start/linkcmds
@@ -199,7 +199,7 @@ SECTIONS
   PROVIDE (end = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstackidle (NOLOAD) : {
diff --git a/bsps/sh/gensh2/start/linkcmds.ram b/bsps/sh/gensh2/start/linkcmds.ram
index ccf752a26b..c6f173d129 100644
--- a/bsps/sh/gensh2/start/linkcmds.ram
+++ b/bsps/sh/gensh2/start/linkcmds.ram
@@ -201,7 +201,7 @@ SECTIONS
   PROVIDE (end = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstackidle (NOLOAD) : {
diff --git a/bsps/sh/gensh2/start/linkcmds.rom b/bsps/sh/gensh2/start/linkcmds.rom
index 6b2a760cfa..2d3071e260 100644
--- a/bsps/sh/gensh2/start/linkcmds.rom
+++ b/bsps/sh/gensh2/start/linkcmds.rom
@@ -202,7 +202,7 @@ SECTIONS
   PROVIDE (end = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstackidle (NOLOAD) : {
diff --git a/bsps/sh/gensh4/start/linkcmds b/bsps/sh/gensh4/start/linkcmds
index b940aadb2b..b0a4baeef4 100644
--- a/bsps/sh/gensh4/start/linkcmds
+++ b/bsps/sh/gensh4/start/linkcmds
@@ -146,7 +146,7 @@ SECTIONS
   } > ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/sh/gensh4/start/linkcmds.rom b/bsps/sh/gensh4/start/linkcmds.rom
index 704b624f01..127bc38763 100644
--- a/bsps/sh/gensh4/start/linkcmds.rom
+++ b/bsps/sh/gensh4/start/linkcmds.rom
@@ -189,7 +189,7 @@ SECTIONS
   } > ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/sh/gensh4/start/linkcmds.rom2ram b/bsps/sh/gensh4/start/linkcmds.rom2ram
index 6785556416..89d8c59bd1 100644
--- a/bsps/sh/gensh4/start/linkcmds.rom2ram
+++ b/bsps/sh/gensh4/start/linkcmds.rom2ram
@@ -193,7 +193,7 @@ SECTIONS
     } >ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/sh/shsim/start/linkcmds b/bsps/sh/shsim/start/linkcmds
index 3a8d0d9d5b..e22e0bc98a 100644
--- a/bsps/sh/shsim/start/linkcmds
+++ b/bsps/sh/shsim/start/linkcmds
@@ -204,7 +204,7 @@ SECTIONS
   PROVIDE (end = .);
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/sparc/shared/start/linkcmds.base b/bsps/sparc/shared/start/linkcmds.base
index ed7ab38b37..b278c78a46 100644
--- a/bsps/sparc/shared/start/linkcmds.base
+++ b/bsps/sparc/shared/start/linkcmds.base
@@ -155,7 +155,7 @@ SECTIONS
       *(.rela.rtemsrwset*)
     } >ram
   .noinit (NOLOAD) : {
-      *(.noinit*)
+      *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
   .rtemsstack (NOLOAD) : {
     *(SORT(.rtemsstack.*))
diff --git a/bsps/sparc64/shared/start/linkcmds b/bsps/sparc64/shared/start/linkcmds
index eb744b45ab..480843cde5 100644
--- a/bsps/sparc64/shared/start/linkcmds
+++ b/bsps/sparc64/shared/start/linkcmds
@@ -180,7 +180,7 @@ SECTIONS
   } > ram
 
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   } > ram
 
   .rtemsstack (NOLOAD) : {
diff --git a/bsps/v850/gdbv850sim/start/linkcmds b/bsps/v850/gdbv850sim/start/linkcmds
index 84f5dc6690..274cbeb96e 100644
--- a/bsps/v850/gdbv850sim/start/linkcmds
+++ b/bsps/v850/gdbv850sim/start/linkcmds
@@ -193,7 +193,7 @@ SECTIONS
 	*(COMMON)
   }
   .noinit (NOLOAD) : {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
   .rtemsstack (NOLOAD) : {
     *(SORT(.rtemsstack.*))
diff --git a/bsps/x86_64/amd64/start/linkcmds b/bsps/x86_64/amd64/start/linkcmds
index ab6981e872..c7bd54279b 100644
--- a/bsps/x86_64/amd64/start/linkcmds
+++ b/bsps/x86_64/amd64/start/linkcmds
@@ -234,7 +234,7 @@ SECTIONS
   _end = .; PROVIDE (end = .);
   .noinit (NOLOAD) :
   {
-    *(.noinit*)
+    *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
   }
   .rtemsstack (NOLOAD) :
   {
-- 
2.35.3



More information about the devel mailing list