[5 PATCH] powerpc/motorola_power: Place any common data in the .bss section

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


On 28/2/21 3:15 am, Joel Sherrill wrote:
> Looks good.

Great. The patch has been independently tested. I will push a similar change to
master without a review. I think it is safe to do that.

Chris

> 
> On Fri, Feb 26, 2021, 5:59 PM <chrisj at rtems.org <mailto:chrisj at rtems.org>> wrote:
> 
>     From: Chris Johns <chrisj at rtems.org <mailto:chrisj at rtems.org>>
> 
>     - 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 a87a07cfd7..501acc40dc 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*)
>        }
>      }
>     -- 
>     2.27.0
> 
>     _______________________________________________
>     devel mailing list
>     devel at rtems.org <mailto:devel at rtems.org>
>     http://lists.rtems.org/mailman/listinfo/devel
>     <http://lists.rtems.org/mailman/listinfo/devel>
> 


More information about the devel mailing list