8sa1-binutils-gdb/ld/scripttempl
Hans-Peter Nilsson 555a578963 mmix ld: move .init (and _init) first.
This both makes the section layout more similar to that of the general
default for ELF and fixes (makes true) an assumption that code and
rodata is located between _init and __etext, in
libgcc/config/mmix/crti.S.  Sadly, that's not actually true for ELF
(generally and for elf64mmix), where exception-tables and .rodata is
after _etext; I'm pondering what to do about that.

The original mmix simulator behavior is that memory magically appears
on access, initialized with 0, which is not preferable when chasing
bugs by throwing code the size of the gcc test-suite to the simulator.
The code in crti.S compatibly enables simulator machinery to identify
undefined memory and instead stopping the simulator with an error
(going to interactive mode for interactive runs).  See
http://gcc.gnu.org/legacy-ml/gcc-patches/2012-10/msg01871.html for
more, including the mmix-sim.ch "patch file".

This fixes only one error in the gcc testsuite,
gcc.c-torture/execute/pr20621-1.c with LTO, where for some reason
gcc/lto chooses to move (writable) data that is only used to read 0 to
.rodata.  An access (sufficiently far inside a block) in an
unregistered place is flagged as an invalid access.

The bpo-9m test that I had to adjust, actually exposes a wart: mmo
does not have the notion of symbol types (or sections) and the
test-case now has leading zeros at "Main" eventually leading to it
being misdiagnosed as being outside .text and .data, thus here mapped
to BFD as an absolute symbol.  The test is not intended to check the
mmo symbol-type machinery, so I'm just tweaking it to be
symbol-type-neutral for "Main".

Since you have to jump through hoops to see the problem, I don't think
this commit is worth putting on the 2.35-branch.

ld:
	* scripttempt/mmo.sc: Move .init first in .text output section.
	* testsuite/ld-mmix/bpo-9m.d: Adjust accordingly.
2020-07-17 00:56:17 +02: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 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
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 MSP430: Add input section rules for .upper sections to default linker script 2020-01-16 13:22:31 +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 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elfarc.sc [ARC][committed] Use DWARF.sc in elf linker script templates. 2020-01-13 11:16:47 +02:00
elfarcv2.sc [ARC][committed] Use DWARF.sc in elf linker script templates. 2020-01-13 11:16:47 +02: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 Use the correct names for the init and fini array start symbols in the default Pru linker script. 2019-05-09 10:26:11 +01: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.