[PATCH] riscv/start: Startup sequence update.

somesh deshmukh someshdeshmukh07 at gmail.com
Mon May 3 11:25:27 UTC 2021


Hi Sebastian,

I tried this patch with the master branch and the build is failing after
applying the patch.

The error message includes:

/home/somesh/Documents/rtems-temp/rtems/6/lib/gcc/riscv-rtems6/10.2.1/../../../../riscv-rtems6/bin/ld:
/home/somesh/work/rtems-master/rtems/build/riscv/rv64imafdc_medany/testsuites/samples/hello.exe
section `.unexpected_sections' will not fit in region `UNEXPECTED_SECTIONS'
/home/somesh/Documents/rtems-temp/rtems/6/lib/gcc/riscv-rtems6/10.2.1/../../../../riscv-rtems6/bin/ld:
region `UNEXPECTED_SECTIONS' overflowed by 65537 bytes
collect2: error: ld returned 1 exit status

The overflowed size is equal to the size allocated for bsp_fdt_blob in the
bss section.  From example .lst file ' .bss 0000000000010000 bsp_fdt_blob'

I found this in the riscv linkcmds.base.in file:

/*
* This is a RTEMS specific section to catch all unexpected input
* sections.  In case you get an error like
*   "section `.unexpected_sections' will not fit in region
*   `UNEXPECTED_SECTIONS'"
* you have to figure out the offending input section and add it to the
* appropriate output section definition above.
*/
.unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS

Do we have to add a similar entry for noinit section here?

Regards,
Somesh

On Mon, May 3, 2021 at 12:18 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 30/04/2021 15:34, Sebastian Huber wrote:
>
> > On 30/04/2021 15:32, Hesham Almatary wrote:
> >
> >>     The noinit attributes is a bit broken in GCC:
> >>
> >> I guess we can go for a separate custom section then? Or we can just
> >> assign it a magic value so that it doesn’t go into BSS.
> >
> > I propose to add something like this:
> >
> > +/* Generated from spec:/rtems/basedefs/if/noinit */
> > +
> > +/**
> > + * @ingroup RTEMSAPIBaseDefs
> > + *
> > + * @brief Instructs the compiler to place the variable in a section
> > which is
> > + *   not initialized.
> > + */
> > +#define RTEMS_NOINIT RTEMS_SECTION( ".noinit" )
> >
> > I work currently on a support for this in the linker command files.
>
> I checked in the .noinit support. Could you please check if this patch
> fixes the problem:
>
> https://lists.rtems.org/pipermail/devel/2021-May/067005.html
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210503/68d54772/attachment.html>


More information about the devel mailing list