8sa1-binutils-gdb/ld/scripttempl
Jozef Lawrynowicz 2c6f3e56cb ELF: Support .noinit and .persistent sections
The ".persistent" section is for data that should be initialized during
load, but not during application reset.

The ".noinit" section is for data that should not be initialized during
load or application reset.

Targets utilizing the elf.sc linker script template can define
HAVE_{NOINIT,PERSISTENT}=yes to include the .noinit or .persistent
output sections in the generated linker script.

Targets with existing support for .noinit did not handle unique
.noinit.* and .gnu.linkonce.n.* sections the .noinit output section,
this patch also fixes that.

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.
2020-11-27 10:45:35 +00:00
..
aix.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
alpha.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
alphavms.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
aout.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arclinux.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
armbpabi.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
avr.sc ELF: Support .noinit and .persistent sections 2020-11-27 10:45:35 +00:00
crisaout.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
dlx.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
DWARF.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf32cr16.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf32crx.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf32msp430.sc ELF: Support .noinit and .persistent sections 2020-11-27 10:45:35 +00:00
elf32xc16x.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf32xc16xl.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf32xc16xs.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf64bpf.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf64hppa.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf_chaos.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf.sc ELF: Support .noinit and .persistent sections 2020-11-27 10:45:35 +00:00
elfarc.sc ARC: Fix ld/pr24511 test 2020-07-31 12:15:17 +03:00
elfarcv2.sc ELF: Support .noinit and .persistent sections 2020-11-27 10:45:35 +00:00
elfd10v.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfd30v.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfm9s12z.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfm68hc11.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfm68hc12.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfmicroblaze.sc microblaze-linux XPASS ld-elf/var1 2020-06-30 13:32:04 +09:30
elfxgate.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfxtensa.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
epiphany_4x4.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ft32.sc Add SORT_NONE to .init and .fini in scripts 2019-03-21 22:19:20 +10:30
hppaelf.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
i386beos.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
i386go32.sc [PATCH 1/2] coff-go32: update ldscript 2020-04-17 13:12:31 +01:00
i386msdos.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ia64vms.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ip2k.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
iq2000.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mcorepe.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mep.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mips.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mipsbsd.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mmo.sc mmix ld: move .init (and _init) first. 2020-07-17 00:56:17 +02:00
moxie.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
nds32elf.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pdp11.sc Fixes for the magic number used in PDP11 AOUT binaries. 2020-04-14 14:41:27 +01:00
pe.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pep.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pj.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
pru.sc ELF: Support .noinit and .persistent sections 2020-11-27 10:45:35 +00:00
README Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
sh.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic4xcoff.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic30coff.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
tic54xcoff.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
v850_rh850.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
v850.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
vanilla.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
visium.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
xstormy16.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
z80.sc Add support for the GBZ80, Z180, and eZ80 variants of the Z80 architecure. Add an ELF based target for these as well. 2020-01-02 14:14:59 +00:00
z8000.sc Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are linker script templates.
genscripts.sh sets some shell variables, then sources
EMULATION.sc, to generate EMULATION.{x,xr,xu,xn,xbn} -- the script
files for default, -r, -Ur, -n, -N.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.