binutils-gdb/ld/scripttempl
Alan Modra 6c1aca3e2d Start of relro segment adjustment
Adjusting the start of the relro segment in order to make it end
exactly on a page boundary runs into difficulties when sections in the
relro segment are aligned;  Adjusting the start by (next_page - end)
sometimes results in more than that adjustment occurring at the end,
overrunning the page boundary.  So when that occurs we try a new lower
start position by masking the adjusted start with the maximum section
alignment.  However, we didn't consider that this masked start address
may in fact be before the initial relro base, which is silly since
that can only increase padding at the relro end.

I've also moved some calculations closer to where they are used, and
comments closer to the relevant statements.

	* ldlang.c (lang_size_sections): When alignment of sections
	results in relro base adjustment being too large, don't go lower
	than the initial value.
	* ldexp.c (fold_binary <DATA_SEGMENT_RELRO_END>): Comment.
	* scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Omit SEGMENT_SIZE
	alignment when SEGMENT_SIZE is the same as MAXPAGESIZE.
2015-04-01 19:37:58 +10:30
..
aix.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
alpha.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
alphavms.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
aout.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
armaout.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
armbpabi.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
armcoff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
avr.sc This patch modifies the AVR linker script templates to use __<name>_REGION_LENGTH__ symbols, if provided, for setting memory region lengths, defaulting to the current constant values otherwise. 2015-02-24 11:26:28 +00:00
avrtiny.sc This patch modifies the AVR linker script templates to use __<name>_REGION_LENGTH__ symbols, if provided, for setting memory region lengths, defaulting to the current constant values otherwise. 2015-02-24 11:26:28 +00:00
crisaout.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
delta68.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dlx.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
DWARF.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32cr16.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32cr16c.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32crx.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32msp430_3.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32msp430.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32sh-symbian.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32xc16x.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32xc16xl.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf32xc16xs.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf64hppa.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf_chaos.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elf.sc Start of relro segment adjustment 2015-04-01 19:37:58 +10:30
elfd10v.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfd30v.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfi370.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfm68hc11.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfm68hc12.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfmicroblaze.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfxgate.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
elfxtensa.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
epiphany_4x4.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
epocpe.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ft32.sc FT32 initial support 2015-01-28 16:25:18 +10:30
h8300.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8300h.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8300hn.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8300s.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8300sn.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8300sx.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8300sxn.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8500.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8500b.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8500c.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8500m.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
h8500s.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hppaelf.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i386beos.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i386coff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i386go32.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i386msdos.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i860coff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
i960.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ia64vms.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ip2k.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
iq2000.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m68kaux.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m68kcoff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
m88kbcs.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mcorepe.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mep.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mips.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mipsbsd.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
mmo.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
moxie.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
nds32elf.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
nw.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
pe.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
pep.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
pj.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ppcpe.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
psos.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
README ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
riscix.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sh.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sparccoff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
st2000.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
tic4xcoff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
tic30aout.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
tic30coff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
tic54xcoff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
tic80coff.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
v850_rh850.sc Adds support for generating notes in V850 binaries. 2015-02-24 17:54:09 +00:00
v850.sc Adds support for generating notes in V850 binaries. 2015-02-24 17:54:09 +00:00
vanilla.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
visium.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
w65.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xstormy16.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
z80.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
z8000.sc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +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-2015 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.