public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@linaro.org>
To: gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][ARM] Add support for "noinit" attribute
Date: Mon, 01 Jul 2019 12:16:00 -0000	[thread overview]
Message-ID: <CAKdteOauBfEd7G3M67Bn3BdNHN6xr7ho_y1CTBVrGVS-5-xN5g@mail.gmail.com> (raw)
In-Reply-To: <CAKdteOZOBwhFSgbt2N6Ft8JNwuGSYToNUc2moii65CG+weGtOA@mail.gmail.com>

ping?

On Thu, 13 Jun 2019 at 17:13, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
>
> Hi,
>
> Similar to what already exists for TI msp430 or in TI compilers for
> arm, this patch adds support for "noinit" attribute for arm. It's very
> similar to the corresponding code in GCC for msp430.
>
> It is useful for embedded targets where the user wants to keep the
> value of some data when the program is restarted: such variables are
> not zero-initialized.It is mostly a helper/shortcut to placing
> variables in a dedicated section.
>
> It's probably desirable to add the following chunk to the GNU linker:
> diff --git a/ld/emulparams/armelf.sh b/ld/emulparams/armelf.sh
> index 272a8bc..9555cec 100644
> --- a/ld/emulparams/armelf.sh
> +++ b/ld/emulparams/armelf.sh
> @@ -10,7 +10,19 @@ OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)
> *(.vfp11_veneer) *(.v4_bx)'
>  OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ =
> .${CREATE_SHLIB+)};"
>  OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ =
> .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ =
> .${CREATE_SHLIB+)};"
>  OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
> -OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
> +OTHER_SECTIONS='
> +.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
> +  /* This section contains data that is not initialised during load
> +     *or* application reset.  */
> +   .noinit (NOLOAD) :
> +   {
> +     . = ALIGN(2);
> +     PROVIDE (__noinit_start = .);
> +     *(.noinit)
> +     . = ALIGN(2);
> +     PROVIDE (__noinit_end = .);
> +   }
> +'
>
> so that the noinit section has the "NOLOAD" flag.
>
> I'll submit that part separately to the binutils project if OK.
>
> OK?
>
> Thanks,
>
> Christophe

  reply	other threads:[~2019-07-01 12:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 15:13 Christophe Lyon
2019-07-01 12:16 ` Christophe Lyon [this message]
2019-07-01 15:58 ` Kyrill Tkachov
2019-07-02  8:39   ` Richard Earnshaw
2019-07-02  8:44     ` Richard Earnshaw
2019-07-02 10:13     ` Richard Earnshaw
2019-07-02 10:30       ` Richard Earnshaw
2019-07-02 14:49         ` Christophe Lyon
2019-07-03  9:51           ` Richard Earnshaw
2019-07-03 12:56             ` Christophe Lyon
2019-07-02 15:01   ` Christophe Lyon
2019-07-02 15:44     ` Martin Sebor
2019-07-02 17:12     ` Segher Boessenkool
2019-07-01 21:35 ` Sandra Loosemore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKdteOauBfEd7G3M67Bn3BdNHN6xr7ho_y1CTBVrGVS-5-xN5g@mail.gmail.com \
    --to=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).