[rtems commit] powerpc/motorola_power: Place any common data in the .bss section

Chris Johns chrisj at rtems.org
Sun Feb 28 01:28:32 UTC 2021


Module:    rtems
Branch:    5
Commit:    d1bab986ca364cc691f332d914d8bb0e4142886b
Changeset: http://git.rtems.org/rtems/commit/?id=d1bab986ca364cc691f332d914d8bb0e4142886b

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Feb 26 13:54:37 2021 -1000

powerpc/motorola_power: Place any common data in the .bss section

- It seems the compiler how defaults to -fcommon and this means
  some uninitialised data is ignored.

Closes #4266

---

 bsps/powerpc/motorola_powerpc/bootloader/ppcboot.lds | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bsps/powerpc/motorola_powerpc/bootloader/ppcboot.lds b/bsps/powerpc/motorola_powerpc/bootloader/ppcboot.lds
index a87a07c..501acc4 100644
--- a/bsps/powerpc/motorola_powerpc/bootloader/ppcboot.lds
+++ b/bsps/powerpc/motorola_powerpc/bootloader/ppcboot.lds
@@ -40,6 +40,7 @@ SECTIONS
     *(.text)
     *(.text*)
     *(.sdata2)
+    *(.sdata2*)
     *(.rodata)
     *(.rodata*)
   }
@@ -72,13 +73,17 @@ SECTIONS
     *(.data)
     *(.data*)
     *(.sdata)
+    *(.sdata*)
     . = ALIGN(4);
     _data_end = .;
   }
   .bss :
   {
     *(.sbss)
+    *(.sbss*)
     *(.bss)
+    *(.bss*)
+    *(COMMON)
     . = ALIGN(4);
     _bss_end = .;
   }
@@ -96,6 +101,7 @@ SECTIONS
 
   /DISCARD/ : 
   {
-    *(.comment)
+    *(.comment*)
+    *(.debug*)
   }
 }



More information about the vc mailing list