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. |
||
|---|---|---|
| .. | ||
| aix.sc | ||
| alpha.sc | ||
| alphavms.sc | ||
| aout.sc | ||
| arclinux.sc | ||
| armbpabi.sc | ||
| avr.sc | ||
| crisaout.sc | ||
| dlx.sc | ||
| DWARF.sc | ||
| elf32cr16.sc | ||
| elf32crx.sc | ||
| elf32msp430.sc | ||
| elf32xc16x.sc | ||
| elf32xc16xl.sc | ||
| elf32xc16xs.sc | ||
| elf64bpf.sc | ||
| elf64hppa.sc | ||
| elf_chaos.sc | ||
| elf.sc | ||
| elfarc.sc | ||
| elfarcv2.sc | ||
| elfd10v.sc | ||
| elfd30v.sc | ||
| elfm9s12z.sc | ||
| elfm68hc11.sc | ||
| elfm68hc12.sc | ||
| elfmicroblaze.sc | ||
| elfxgate.sc | ||
| elfxtensa.sc | ||
| epiphany_4x4.sc | ||
| ft32.sc | ||
| hppaelf.sc | ||
| i386beos.sc | ||
| i386go32.sc | ||
| i386msdos.sc | ||
| ia64vms.sc | ||
| ip2k.sc | ||
| iq2000.sc | ||
| mcorepe.sc | ||
| mep.sc | ||
| mips.sc | ||
| mipsbsd.sc | ||
| mmo.sc | ||
| moxie.sc | ||
| nds32elf.sc | ||
| pdp11.sc | ||
| pe.sc | ||
| pep.sc | ||
| pj.sc | ||
| pru.sc | ||
| README | ||
| sh.sc | ||
| tic4xcoff.sc | ||
| tic30coff.sc | ||
| tic54xcoff.sc | ||
| v850_rh850.sc | ||
| v850.sc | ||
| vanilla.sc | ||
| visium.sc | ||
| xstormy16.sc | ||
| z80.sc | ||
| z8000.sc | ||
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.