binutils-gdb/ld/emultempl
Jozef Lawrynowicz 1a9f72a7a8 MSP430: ld: Update output section tail when shuffling ".either" sections
The MSP430 linker shuffles input sections with names beginning with
".either" between the upper and lower memory regions, to try to avoid
one region overflowing when there is space in the other region.

However, when an ".either" input section attached to the tail of an
output section was moved to a different output section in the other
region, that tail wasn't being updated to the new section at the end
of the original output section.

This caused a bug where a shuffled section could end up in the
middle of another section in the output executable, resulting in
corrupted code or data.

When changing the output section of an input section attached to the
tail of its output section, that tail is now updated to point to
the new input section at the end of the section list.

ld/ChangeLog:

2020-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* emultempl/msp430.em (change_output_section): Update the tail
	of the output section statement list when moving the original
	tail to a different output section.
	(eval_upper_either_sections): Don't move sections from the upper
	region to the lower region unless the upper region is
	overflowing.
2020-08-06 11:19:36 +01:00
..
aarch64elf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
aix.em XCOFF linker script PROVIDE support 2020-07-07 18:26:33 +09:30
alphaelf.em
arclinux.em
armcoff.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
armelf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
astring.sed
avrelf.em
beos.em Remove powerpc PE support 2020-07-09 22:58:16 +09:30
bfin.em
cr16elf.em
crxelf.em
cskyelf.em ld --help output 2020-06-24 20:00:08 +09:30
elf-generic.em
elf-x86.em x86: Check static link of dynamic objects 2020-03-13 07:39:06 -07:00
elf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
epiphanyelf_4x4.em
genelf.em
generic.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
hppaelf.em
ia64elf.em
irix.em
linux.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
m68hc1xelf.em
m68kelf.em
metagelf.em
mipself.em
mmix-elfnmmo.em
mmixelf.em
mmo.em
msp430.em MSP430: ld: Update output section tail when shuffling ".either" sections 2020-08-06 11:19:36 +01:00
nds32elf.em
needrelax.em
netbsd.em
nios2elf.em
ostring.sed
pdp11.em Fixes for the magic number used in PDP11 AOUT binaries. 2020-04-14 14:41:27 +01:00
pe.em Remove powerpc PE support 2020-07-09 22:58:16 +09:30
pep.em Replace "if (x) free (x)" with "free (x)", ld 2020-05-21 10:45:33 +09:30
ppc32elf.em
ppc64elf.em Power10 stub selection 2020-07-19 12:27:47 +09:30
pruelf.em
README
riscvelf.em
rxelf.em
rxlinux.em ld: Add rx-linux emulation. gas: Change ELF flags initial value in rx-linux 2020-04-30 13:35:37 +01:00
s390.em
scoreelf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
solaris2-x86.em
solaris2.em
spu_icache.o_c
spu_icache.S
spu_ovl.o_c
spu_ovl.S
spuelf.em Use bfd_get_filename throughout ld 2020-05-19 12:57:15 +09:30
tic6xdsbt.em
ticoff.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
v850elf.em
vanilla.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
vms.em
vxworks.em
xtensaelf.em xtensa: allow runtime ABI selection 2020-06-15 13:01:30 -07:00
z80.em Various fixes for the Z80 support. 2020-02-19 17:46:10 +00:00

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 sourced by genscripts.sh, after
setting some variables to substitute in, to produce
C source files that contain jump tables for each emulation.

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.