[PATCH] ARM: Support .noinit and .persistent sections in ELF linker script

Jozef Lawrynowicz jozef.l@mittosystems.com
Tue Feb 9 15:29:56 GMT 2021


On Wed, Feb 3, 2021 at 10:06 AM Jan Beulich <jbeulich@suse.com> wrote:

> On 26.11.2020 19:13, Jozef Lawrynowicz wrote:
> > I've attached a new patch with the new sections defined in elf.sc. They
> > are not included in the linker script by default, instead they are
> > optionally turned on by setting HAVE_{NOINIT,PERSISTENT}=yes.
> >
> > Out of the targets already defining .noinit or .persistent in their
> > linker scripts, ARM is actually the only one using elf.sc as a base
> > script.
> >
> > The sections are now also listed in the "special_sections" structure in
> > bfd/elf.c.
> >
> > Successfully regtested for aarch64-elf arc-elf arm-eabi avr-elf
> > msp430-elf pru-elf x86_64-pc-linux-gnu, ok to apply?
>
> Aiui arm-eabi and e.g. arm-linux-gnueabi (the latter is what I
> use) use different emulations, yet the test cases get enabled
> for all of arm-*-*. armelf_linux.sh hasn't got the additions,
> which I understand is the reason for the .noinit and .persistent
> test failures on 2.36.
>
> If that's correct, the question is whether the script needs
> adding the settings, or the tests need excluding.
>

It should be ok to enable noinit/persistent support in armelf_linux.sh.
I'm sure there could be applications targeting that emulation, which have
low level
features requiring data to be placed in these specific memory areas.

However, I'm not really set up for Binutils development at the moment,
so won't be able to add that support myself.

Jozef


> Jan
>


More information about the Binutils mailing list