binutils-gdb/ld/scripttempl
Jakub Jelinek 8c37241be3 bfd/
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
	into .dynsym if elf_section_data (sec)->dynindx <= 0.
	Adjust counting of last_local.
	(_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
	other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
	created by the linker nor !SHF_ALLOC.

	* elf32-i386.c (elf_i386_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.  Set sh_entsize for .got section in addition
	to .got.plt.
	(elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
	is at sgot->output_section->vma.
	* elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.
	(elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
	is at sgot->output_section->vma.  Set sh_entsize for .got section
	in addition to .got.plt.
	* elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
	(bfd_section_from_phdr): Likewise.
	(map_sections_to_segments): Likewise.
	(assign_file_positions_for_segments): Likewise.
	(get_program_header_size): Likewise.
	* elflink.c (bfd_elf_size_dynamic_sections): Set
	elf_tdata (output_bfd)->relro from info->relro.
	* elf-bfd.h (struct elf_obj_tdata): Add relro field.
include/
	* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
	relro_end fields.
	* elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
	(PT_GNU_RELRO): Define.
binutils/
	* readelf.c (get_segment_type): Handle PT_GNU_RELRO.
ld/
	* genscripts.sh: Generate -z combreloc -z now -z relro scripts
	for binaries, -shared and -pie.
	* emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
	* emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
	* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
	(OTHER_RELRO_SECTIONS): ... this.
	* ldlex.l (DATA_SEGMENT_RELRO_END): Add.
	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
	-z relro and -z norelro.
	(gld${EMULATION_NAME}_list_options): Add it to usage.
	(gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
	-z relro scripts when appropriate.
	* scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
	Create separate .got.plt section if SEPARATE_GOTPLT.
	Move sections which are only written during relocation handling
	to the beginning of RW segment.  If NO_SMALL_DATA, move .got
	before .data.  Add DATA_SEGMENT_RELRO_END directive.
	Include OTHER_RELRO_SECTIONS.
	* ldgram.y (DATA_SEGMENT_RELRO_END): Add.
	* ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
	(fold_unary): Likewise.
	(fold_binary): Handle -z relro.
	* ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
	exp_dataseg_relro_adjust phases.  Add relro_end field.
	* ldmain.c (main): Initialize link_info.relro to FALSE.
	* ldlang.c (lang_size_sections): Handle -z relro.
ld/testsuite/
	* ld-i386/tlspic.rd: Adjust for section reordering changes
	and removal of unneeded STT_SECTION symbols from .dynsym.
	* ld-i386/tlspic.dd: Likewise.
	* ld-i386/tlspic.sd: Likewise.
	* ld-i386/tlsbin.rd: Likewise.
	* ld-i386/tlsbinpic.s: Likewise.
	* ld-i386/tlsbin.dd: Likewise.
	* ld-i386/tlsbin.sd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlsnopic1.s: Likewise.
	* ld-i386/combreloc.d: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlsbin.dd: Likewise.
	* ld-x86-64/tlspic.sd: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/tlspic.td: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-s390/tlspic1.s: Likewise.
	* ld-s390/tlsbinpic.s: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-s390/tlsbin.rd: Likewise.
	* ld-s390/tlspic.dd: Likewise.
	* ld-s390/tlsbin.dd: Likewise.
	* ld-s390/tlsbin.sd: Likewise.
	* ld-s390/tlsbin.td: Likewise.
	* ld-s390/tlspic.sd: Likewise.
	* ld-s390/tlspic.td: Likewise.
	* ld-s390/tlspic1_64.s: Likewise.
	* ld-s390/tlsbinpic_64.s: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-s390/tlsbin_64.rd: Likewise.
	* ld-s390/tlspic_64.dd: Likewise.
	* ld-s390/tlsbin_64.dd: Likewise.
	* ld-s390/tlspic_64.sd: Likewise.
	* ld-s390/tlspic_64.td: Likewise.
	* ld-s390/tlsbin_64.td: Likewise.
	* ld-s390/tlsbin_64.sd: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlsso32.d: Likewise.
	* ld-powerpc/tlsso32.g: Likewise.
	* ld-powerpc/tlsso32.t: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-ia64/tlspic.rd: Likewise.
	* ld-ia64/tlspic.dd: Likewise.
	* ld-ia64/tlspic.sd: Likewise.
	* ld-ia64/tlspic.td: Likewise.
	* ld-ia64/tlsbin.rd: Likewise.
	* ld-ia64/tlsbin.sd: Likewise.
	* ld-ia64/tlsbin.td: Likewise.
	* ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x.
	* ld-shared/shared.exp: Likewise.
2004-05-11 17:08:38 +00:00
..
README 19990502 sourceware import 1999-05-03 07:29:11 +00:00
a29k.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
aix.sc * emulparams/elf64ppc.sh (DATA_ADDR): Define. 2002-09-24 04:02:03 +00:00
alpha.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
aout.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
armaout.sc Fix arm aout placement of .bss section 2001-10-11 17:28:43 +00:00
armcoff.sc Add iWMMXt support 2003-03-25 20:56:01 +00:00
avr.sc * scripttempl/avr.sc: Do not set LMA for "eeprom" section. 2004-05-08 21:52:56 +00:00
crisaout.sc * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and 2003-04-14 13:03:17 +00:00
delta68.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
dlx.sc Add DLX target 2002-05-28 14:08:47 +00:00
ebmon29k.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
elf.sc bfd/ 2004-05-11 17:08:38 +00:00
elf32cr16c.sc Add (linker) support for CR16C processor 2004-03-30 14:04:32 +00:00
elf32msp430.sc (HEAP_SECTION_MSP430): New section for forthcoming devices. 2003-12-03 10:44:50 +00:00
elf32msp430_3.sc Add initX, finiX, ctors, dtors sections to respect C++ constructor/destructor. 2003-04-09 11:07:51 +00:00
elf_chaos.sc * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and 2003-04-14 13:03:17 +00:00
elfd10v.sc * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and 2003-04-14 13:03:17 +00:00
elfd30v.sc * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and 2003-04-14 13:03:17 +00:00
elfi370.sc * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define. 2001-11-22 09:08:05 +00:00
elfm68hc11.sc * scripttempl/elfm68hc12.sc: Add gcc_except_table. 2003-07-29 20:17:17 +00:00
elfm68hc12.sc * scripttempl/elfm68hc12.sc: Define eeprom memory region. 2003-10-27 10:10:57 +00:00
elfxtensa.sc * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and 2003-04-14 13:03:17 +00:00
epocpe.sc Add arm-epoc-pe specific linker script 1999-12-02 11:49:20 +00:00
h8300.sc Add support for h8300hn and h8300sn 2003-04-24 12:36:08 +00:00
h8300h.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 11:42:27 +00:00
h8300hn.sc oops - omitted from previous delta 2003-04-24 15:25:24 +00:00
h8300s.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 11:42:27 +00:00
h8300sn.sc oops - omitted from previous delta 2003-04-24 15:25:24 +00:00
h8300sx.sc 2003-06-03 Michael Snyder <msnyder@redhat.com> 2003-06-03 21:43:52 +00:00
h8300sxn.sc * scripttempl/h8300sxn.sc: New file. 2003-06-10 08:31:04 +00:00
h8500.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 18:58:36 +00:00
h8500b.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 18:58:36 +00:00
h8500c.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 18:58:36 +00:00
h8500m.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 18:58:36 +00:00
h8500s.sc 2001-01-10 Kazu Hirata <kazu@hxi.com> 2001-01-10 18:58:36 +00:00
hppaelf.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
i386beos.sc Add .gnu.linkonce.wi.* to .debug_info sections. 2000-09-02 20:43:22 +00:00
i386coff.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
i386go32.sc * scripttempl/i386go32.sc: Handle bss unique sections. 2002-09-23 11:36:15 +00:00
i386lynx.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
i386msdos.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
i860coff.sc 2003-08-04 Christian Groessler <chris@groessler.org> 2003-08-06 02:19:05 +00:00
i960.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
ip2k.sc Add IP2k support to BFD and LD 2002-07-17 14:15:52 +00:00
iq2000.sc * scripttempl/elf.sc (CTOR): Handle crtbeginS.o, crtendS.o and 2003-04-14 13:03:17 +00:00
m68kaux.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
m68kcoff.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
m68klynx.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
m88kbcs.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
mcorepe.sc Fix typo in defintion of OUTPUT_FORMAT. 1999-08-11 09:21:38 +00:00
mips.sc [ bfd/ChangeLog ] 2004-04-21 20:52:31 +00:00
mipsbsd.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
mmo.sc * emultempl/mmix-elfnmmo.em (mmix_before_allocation): Force linker 2003-10-18 15:49:10 +00:00
nw.sc * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define. 2001-11-22 09:08:05 +00:00
or32.sc Add support for OpenRISC 32-bit embedded processor 2002-01-31 17:33:08 +00:00
pe.sc Add support for generating DWARF2 debug sections in the x86 PE port 2004-04-29 16:40:20 +00:00
pj.sc 1999-09-04 Steve Chamberlain <sac@pobox.com> 1999-09-04 17:37:36 +00:00
ppcpe.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
psos.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
riscix.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
sa29200.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
sh.sc From "Anita Kulkarni" <AnitaK@kpit.com> 2002-09-25 17:06:09 +00:00
sparccoff.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
sparclynx.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
st2000.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
tic4xcoff.sc Namespace cleanup for the tic4x target. Replace s/c4x/tic4x/ and s/c3x/tic3x/. 2003 copyright update 2003-04-04 08:15:15 +00:00
tic30aout.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
tic30coff.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
tic54xcoff.sc Remove unimplemented "PAGE N:" flag from default linker script. 2000-06-30 12:36:38 +00:00
tic80coff.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
v850.sc Add EXTERN references to __ctbpm __gp and __ep. 2002-09-02 17:03:30 +00:00
vanilla.sc 19990502 sourceware import 1999-05-03 07:29:11 +00:00
w65.sc Use ${CONSTRUCTING...} to enclose constructors and destructors. 2000-11-03 19:49:05 +00:00
xstormy16.sc Define __data and __rdata 2003-04-18 08:26:17 +00:00
z8000.sc Use ${CONSTRUCTING...} to enclose constructors and destructors. 2000-11-03 19:49:05 +00:00

README

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.