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

Alan Modra amodra@gmail.com
Thu Nov 26 22:57:29 GMT 2020


On Thu, Nov 26, 2020 at 06:13:56PM +0000, Jozef Lawrynowicz wrote:
> bfd/ChangeLog:
> 
> 	* elf.c (special_sections_g): Add .gnu.linkonce.n and .gnu.linkonce.p.
> 	(special_sections_n): Add .noinit.
> 	(special_sections_p): Add .persistent.
> 
> binutils/ChangeLog:
> 
> 	* testsuite/lib/binutils-common.exp (supports_noinit_section): New.
> 	(supports_persistent_section): New.
> 
> gas/ChangeLog:
> 
> 	* testsuite/gas/elf/elf.exp: Run new tests.
> 	* testsuite/gas/elf/section25.d: New test.
> 	* testsuite/gas/elf/section25.s: New test.
> 	* testsuite/gas/elf/section26.d: New test.
> 	* testsuite/gas/elf/section26.s: New test.
> 
> ld/ChangeLog:
> 
> 	* emulparams/armelf.sh (OTHER_SECTIONS): Remove .noinit section
> 	definition.
> 	Define HAVE_{NOINIT,PERSISTENT}=yes.
> 	* scripttempl/avr.sc (.noinit): Add .noinit.* and .gnu.linkonce.n.*
> 	input section wildcard patterns.
> 	* scripttempl/elf.sc: Define .noinit and .persistent sections when
> 	HAVE_NOINIT or HAVE_PERSISTENT are defined to "yes".
> 	* scripttempl/elf32msp430.sc (.noinit): Add .noinit.* and
> 	.gnu.linkonce.n.*. input section wildcard patterns.
> 	(.persistent): Add .persistent.* and
> 	.gnu.linkonce.p.*. input section wildcard patterns.
> 	* scripttempl/elfarcv2.sc (.noinit): Add .noinit.* and
> 	.gnu.linkonce.n.*. input section wildcard patterns.
> 	* scripttempl/pru.sc: Likewise.
> 	* testsuite/ld-elf/noinit-sections-1.d: New test.
> 	* testsuite/ld-elf/noinit-sections-2.d: New test.
> 	* testsuite/ld-elf/noinit-sections-2.l: New test.
> 	* testsuite/ld-elf/noinit-sections.s: New test.
> 	* testsuite/ld-elf/persistent-sections-1.d: New test.
> 	* testsuite/ld-elf/persistent-sections-2.d: New test.
> 	* testsuite/ld-elf/persistent-sections-2.l: New test.
> 	* testsuite/ld-elf/persistent-sections.s: New test.

Looks good to me.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list