[PATCH] RTEMS: Use function and data sections

Joel Sherrill joel at rtems.org
Thu Oct 11 16:43:15 UTC 2018


On Thu, Oct 11, 2018 at 11:09 AM Gedare Bloom <gedare at rtems.org> wrote:

> hi Sebastian,
>
> generally I'm ok, but what toolchains did you test this change for?
>
> does this work for BSPs that have not yet been modified themselves to
> use function/data sections and to have the KEEP() directives?
>

You can check the list of BSPs  which do not have KEEP() directives here:

https://devel.rtems.org/query?status=!closed&keywords=~KEEP

Without LDFLAGS to use per-function/data item linking, the use of extra
sections
does not matter.  We are using ELF on all targets now and there should be
BSPs
on every architecture which use this.

Another question is do you have information on the size impact for the
tests
before and after? I would expect some decline but not a great deal.

--joel

>
>
>
>
> On Thu, Oct 11, 2018 at 4:22 AM, Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
> > Signed-off-by: Sebastian Huber <sebastian.huber at embedded-brains.de>
> > ---
> >  newlib/configure.host | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/newlib/configure.host b/newlib/configure.host
> > index 9e809c9a8..27bce36a1 100644
> > --- a/newlib/configure.host
> > +++ b/newlib/configure.host
> > @@ -637,6 +637,7 @@ case "${host}" in
> >    *-*-rtems*)
> >         default_newlib_io_long_long="yes"
> >         default_newlib_io_c99_formats="yes"
> > +       newlib_cflags="${newlib_cflags} -ffunction-sections
> -fdata-sections "
> >         newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
> >  newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED
> -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DGETREENT_PROVIDED
> -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL
> -DHAVE_ASSERT_FUNC"
> >          # turn off unsupported items in posix directory
> > --
> > 2.16.4
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181011/8b54e0a2/attachment-0002.html>


More information about the devel mailing list