binutils-gdb/ld/emultempl
Alan Modra 93d1b056cb Rewrite ppc32 backend .sdata and .sdata2 handling
1) _SDA_BASE_ and _SDA2_BASE_ and defined automatically, in a similar
   manner to the way _GLOBAL_OFFSET_TABLE_ is handled.  It's a little
   more complicated to remove the symbols because _SDA_BASE_ needs to
   be there if either .sdata or .sbss is present, and similarly for
   _SDA2_BASE.
2) The linker created .sdata and .sdata2 sections used for
   R_PPC_EMB_SDAI16 and R_PPC_EMB_SDA2I16 pointers are created early.
   Nowadays we strip unneeded sections from the output, so it isn't
   necessary to delay creating the sections.
3) The output section for targets of various SDA relocs is now checked
   as per the ABI(s).  We previously allowed .sdata.foo and similar,
   most likely because at some stage we were checking input sections.

Also, the patch fixes a long-standing bug in size_input_sections
that affects the values of symbols defined in stripped input
sections.

	PR 16952
bfd/
	* elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
	Remove redundant setting of htab->elf.dynobj.  Don't align.
	Define .sdata symbols using _bfd_elf_define_linkage_sym.
	(ppc_elf_create_glink): Call ppc_elf_create_linker_section.
	(create_sdata_sym): Delete.
	(elf_allocate_pointer_linker_section): Rename from
	elf_create_pointer_linker_section.  Align section.
	(ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
	directly here, or create_sdata_sym.  Set ref_regular on _SDA_BASE_
	and _SDA2_BASE_.
	(ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
	Remove unnecessary tests on _SDA_BASE_ sym.
	(maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
	(ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
	* elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
	(ppc_elf_maybe_strip_sdata_syms): Declare.
ld/
	* emulparams/elf32ppccommon.sh (_SDA_BASE_, _SDA2_BASE_): Delete.
	* emultempl/ppc32elf.em (ppc_before_allocation): Call
	ppc_elf_maybe_strip_sdata_syms.
	* ldlang.c (size_input_section): Correct output_offset value
	for excluded input sections.
2014-05-20 13:13:23 +09:30
..
README Update copyright years 2014-03-05 22:16:15 +10:30
aarch64elf.em Update copyright years 2014-03-05 22:16:15 +10:30
aix.em Remove search path from -l:namespec DT_NEEDED 2014-03-14 12:54:24 +10:30
alphaelf.em Fix alpha-elf relaxation 2014-04-21 08:14:18 -07:00
armcoff.em Update copyright years 2014-03-05 22:16:15 +10:30
armelf.em Update copyright years 2014-03-05 22:16:15 +10:30
astring.sed
avrelf.em Update copyright years 2014-03-05 22:16:15 +10:30
beos.em Update copyright years 2014-03-05 22:16:15 +10:30
bfin.em Update copyright years 2014-03-05 22:16:15 +10:30
cr16elf.em Update copyright years 2014-03-05 22:16:15 +10:30
crxelf.em Update copyright years 2014-03-05 22:16:15 +10:30
elf-generic.em Update copyright years 2014-03-05 22:16:15 +10:30
elf32.em 2014-04-16 Steve Ellcey <sellcey@mips.com> 2014-04-16 10:47:13 -07:00
epiphanyelf_4x4.em Update copyright years 2014-03-05 22:16:15 +10:30
genelf.em Update copyright years 2014-03-05 22:16:15 +10:30
generic.em Update copyright years 2014-03-05 22:16:15 +10:30
gld960.em Update copyright years 2014-03-05 22:16:15 +10:30
gld960c.em Update copyright years 2014-03-05 22:16:15 +10:30
hppaelf.em Update copyright years 2014-03-05 22:16:15 +10:30
ia64elf.em Update copyright years 2014-03-05 22:16:15 +10:30
irix.em Update copyright years 2014-03-05 22:16:15 +10:30
linux.em Remove search path from -l:namespec DT_NEEDED 2014-03-14 12:54:24 +10:30
lnk960.em Update copyright years 2014-03-05 22:16:15 +10:30
m68hc1xelf.em Update copyright years 2014-03-05 22:16:15 +10:30
m68kcoff.em Update copyright years 2014-03-05 22:16:15 +10:30
m68kelf.em Update copyright years 2014-03-05 22:16:15 +10:30
metagelf.em bfd target vector rationalisation 2014-05-02 20:09:40 +09:30
mipself.em Update copyright years 2014-03-05 22:16:15 +10:30
mmix-elfnmmo.em Update copyright years 2014-03-05 22:16:15 +10:30
mmixelf.em Update copyright years 2014-03-05 22:16:15 +10:30
mmo.em Update copyright years 2014-03-05 22:16:15 +10:30
nds32elf.em Fix fallout from splitting ldbuildid.[ch] off elf32.em. 2014-04-09 13:49:05 +09:30
needrelax.em Update copyright years 2014-03-05 22:16:15 +10:30
netbsd.em Update copyright years 2014-03-05 22:16:15 +10:30
nios2elf.em bfd target vector rationalisation 2014-05-02 20:09:40 +09:30
ostring.sed
pe.em Add support for generating and inserting build IDs into COFF binaries. 2014-04-08 10:59:43 +01:00
pep.em Add support for generating and inserting build IDs into COFF binaries. 2014-04-08 10:59:43 +01:00
ppc32elf.em Rewrite ppc32 backend .sdata and .sdata2 handling 2014-05-20 13:13:23 +09:30
ppc64elf.em Update copyright years 2014-03-05 22:16:15 +10:30
rxelf.em Update copyright years 2014-03-05 22:16:15 +10:30
scoreelf.em Update copyright years 2014-03-05 22:16:15 +10:30
sh64elf.em Update copyright years 2014-03-05 22:16:15 +10:30
solaris2.em Update copyright years 2014-03-05 22:16:15 +10:30
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_icache.o_c bfd/ 2009-03-17 12:46:19 +00:00
spu_ovl.S Update copyright years 2014-03-05 22:16:15 +10:30
spu_ovl.o_c Include the spu_ovl ASCII form in the repository files. 2008-08-02 16:25:44 +00:00
spuelf.em bfd target vector rationalisation 2014-05-02 20:09:40 +09:30
sunos.em Update copyright years 2014-03-05 22:16:15 +10:30
tic6xdsbt.em bfd target vector rationalisation 2014-05-02 20:09:40 +09:30
ticoff.em Update copyright years 2014-03-05 22:16:15 +10:30
vanilla.em Update copyright years 2014-03-05 22:16:15 +10:30
vms.em Remove search path from -l:namespec DT_NEEDED 2014-03-14 12:54:24 +10:30
vxworks.em Update copyright years 2014-03-05 22:16:15 +10:30
xtensaelf.em Update copyright years 2014-03-05 22:16:15 +10:30
z80.em Update copyright years 2014-03-05 22:16:15 +10:30

README

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-2014 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.