old-cross-binutils/ld/emultempl
Alan Modra da44f4e546 Index PowerPC64 linker generated .eh_frame in .eh_frame_hdr
I noticed recently that .eh_frame FDEs generated by the linker for
call stubs and .glink weren't being indexed in .eh_frame_hdr, due to
bfd_elf_discard_info being run before the linker generated .eh_frame
sections were available for parsing.  This patch moves code around in
elf64-ppc.c and ppc64elf.em to avoid that problem.

Another problem fixed here is that --gc-sections parses .eh_frame
early, and the existing machinery allows only one go at parsing the
.eh_frame sections.  That resulted in the linker generated .eh_frame
CIEs not being merged and no .eh_frame_hdr index entries for those
FDEs.  It turns out that all the info from parsing .eh_frame is
attached to the section, so order of parsing isn't important, and
after parsing sec_info_type being set will prevent a section being
parsed again.  At least, when parsing doesn't hit an error.  So there
isn't really any need for "parsed_eh_frame".  "merge_cies" is also
redundant, which means _bfd_elf_{begin,end}_eh_frame_parsing can also
disappear.

bfd/
	* elf-bfd.h (struct eh_frame_hdr_info): Delete merge_cies and
	parsed_eh_frames.
	(_bfd_elf_begin_eh_frame_parsing): Delete.
	(_bfd_elf_end_eh_frame_parsing): Delete.
	* elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): Delete.
	(_bfd_elf_end_eh_frame_parsing): Delete.
	(_bfd_elf_parse_eh_frame): Don't test parsed_eh_frame.  Test
	!info->relocatable in place of merge_cies.
	* elflink.c (bfd_elf_gc_sections, bfd_elf_discard_info): Adjust.
	* elf64-ppc.c (glink_eh_frame_cie): Pad to multiple of 8.
	(ppc64_elf_size_stubs): Likewise pad stub FDE.
	(ppc64_elf_build_stubs): Move code setting glink .eh_frame to..
	(ppc64_elf_size_stubs): ..here and..
	(ppc64_elf_finish_dynamic_sections): ..here.
ld/
	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): Call
	bfd_elf_discard_info after generating glink .eh_frame.  Delete
	redundant test on ppc64_elf_setup_section_lists status.
2014-08-22 10:09:09 +09:30
..
aarch64elf.em Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +09:30
aix.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
alphaelf.em Fix alpha-elf relaxation 2014-04-21 08:14:18 -07:00
armcoff.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
armelf.em ARM/ld: Correct macro formatting in armelf.em 2014-08-20 20:17:18 +01:00
astring.sed
avrelf.em Update copyright years 2014-03-05 22:16:15 +10:30
beos.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
bfin.em Update copyright years 2014-03-05 22:16:15 +10:30
cr16elf.em Make bfd.link_next field a union 2014-06-13 19:10:57 +09: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 Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +09:30
epiphanyelf_4x4.em Update copyright years 2014-03-05 22:16:15 +10:30
genelf.em Make bfd.link_next field a union 2014-06-13 19:10:57 +09:30
generic.em Fix typo. 2014-05-27 19:05:18 -04:00
gld960.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
gld960c.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
hppaelf.em Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +09: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 Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
lnk960.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
m68hc1xelf.em Update copyright years 2014-03-05 22:16:15 +10:30
m68kcoff.em Make bfd.link_next field a union 2014-06-13 19:10:57 +09:30
m68kelf.em Make bfd.link_next field a union 2014-06-13 19:10:57 +09:30
metagelf.em Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +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 Make bfd.link_next field a union 2014-06-13 19:10:57 +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 Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +09:30
ostring.sed
pe.em Change the default behaviour of the PE targeted linker so that timestamps are 2014-06-26 12:18:39 +01:00
pep.em Enabling the HIGH_ENTROPY_VA flag allows the operating system to use 2014-08-20 16:10:29 +01:00
ppc32elf.em Rewrite ppc32 backend .sdata and .sdata2 handling 2014-05-20 13:13:23 +09:30
ppc64elf.em Index PowerPC64 linker generated .eh_frame in .eh_frame_hdr 2014-08-22 10:09:09 +09:30
README Update copyright years 2014-03-05 22:16:15 +10:30
rxelf.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
scoreelf.em Update copyright years 2014-03-05 22:16:15 +10:30
sh64elf.em Linker part of PR16563 fix 2014-08-14 13:49:31 +09:30
solaris2.em Update copyright years 2014-03-05 22:16:15 +10:30
spu_icache.o_c bfd/ 2009-03-17 12:46:19 +00:00
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_ovl.o_c Include the spu_ovl ASCII form in the repository files. 2008-08-02 16:25:44 +00:00
spu_ovl.S Update copyright years 2014-03-05 22:16:15 +10:30
spuelf.em bfd target vector rationalisation 2014-05-02 20:09:40 +09:30
sunos.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
tic6xdsbt.em Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +09:30
ticoff.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
vanilla.em Add new link-map-text hook and RX auto-vector support. 2014-05-27 17:14:49 -04:00
vms.em Return error status from bfd_elf_discard_info. 2014-08-18 09:33:35 +09:30
vxworks.em Update copyright years 2014-03-05 22:16:15 +10:30
xtensaelf.em Fix xtensa ld segfault when linking linux modules 2014-07-10 19:22:07 +04:00
z80.em Update copyright years 2014-03-05 22:16:15 +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 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.