binutils-gdb/ld/emultempl
Alan Modra d871d47806 Move elf32.em and elf-generic.em functions
Many ELF linker targets support multiple "emulations" and thus have
multiple copies of elf32.em being compiled and linked into ld.  This
patch moves much of elf32.em and elf-generic.em into files which will
be compiled just once, resulting in a 20% decrease in ld size for
--enable-targets=all.

	* Makefile.am (ALL_EMUL_EXTRA_OFILES): Add ldelf and ldelfgen.
	(CFILES, HFILES, EXTRA_ld_new_SOURCES): Likewise.
	* configure.tgt: Formatting.
	(targ_extra_ofiles): Init to ldelf.o ldelfgen.o, reset to just
	ldelfgen.o for generic ELF targets, and empty for non-ELF.
	* emultempl/aarch64elf.em (gldaarch64_layout_sections_again): Use
	ldelf_map_segments.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, aarch64_for_each_input_file_wrapper),
	(aarch64_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/alphaelf.em (alpha_after_parse): Use ldelf_map_segments.
	* emultempl/armelf.em (gldarm_layout_sections_again): Likewise.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, arm_for_each_input_file_wrapper),
	(arm_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/cr16elf.em (cr16elf_after_parse): Use ldelf_map_segments.
	* emultempl/crxelf.em (crxelf_after_parse): Likewise.  Delete
	declaration.
	* emultempl/cskyelf.em (gldcsky_layout_sections_again): Use
	ldelf_map_segments.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, csky_for_each_input_file_wrapper),
	(csky_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/genelf.em: Include ldelfgen.h.
	(gld${EMULATION_NAME}_before_allocation): Use ldelf_map_segments.
	* emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
	(hppaelf_layout_sections_again): Likewise.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, hppa_for_each_input_file_wrapper),
	(hppa_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/ia64elf.em (ia64elf_after_parse): Use ldelf_map_segments.
	* emultempl/m68hc1xelf.em (real_func),
	(m68hc11_for_each_input_file_wrapper),
	(m68hc11_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/metagelf.em (metagelf_layout_sections_again): Use
	ldelf_map_segments.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, metag_for_each_input_file_wrapper),
	(metag_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/mipself.em (real_func),
	(mips_for_each_input_file_wrapper),
	(mips_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/mmo.em: Don't include elf-bfd.h, do include ldelfgen.h.
	(gld${EMULATION_NAME}_after_allocation): Use ldelf_map_segments.
	* emultempl/nds32elf.em (nds32_elf_after_parse): Use ldelf_after_parse.
	(nds32_elf_after_allocation): Comment fix.
	* emultempl/nios2elf.em (nios2elf_layout_sections_again): Use
	ldelf_map_segments.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, nios2_for_each_input_file_wrapper),
	(nios2_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	* emultempl/ppc32elf.em (gld${EMULATION_NAME}_load_symbols): Delete
	declaration.
	(ppc_recognized_file): Call ldelf_load_symbols.
	* emultempl/ppc64elf.em (ppc_layout_sections_again): Likewise.
	(gld${EMULATION_NAME}_after_allocation): Likewise.
	(real_func, ppc_for_each_input_file_wrapper),
	(ppc_lang_for_each_input_file): Delete.
	(lang_for_each_input_file): Don't define.
	(gld${EMULATION_NAME}_load_symbols): Don't declare.
	(ppc64_recognized_file): Call ldelf_load_symbols.
	* emultempl/riscvelf.em (gld${EMULATION_NAME}_after_allocation):
	Use ldelf_map_segments.
	* emultempl/spuelf.em (spu_place_special_section): Use
	ldelf_place_orphan.
	* emultempl/tic6xdsbt.em (gld${EMULATION_NAME}_after_allocation):
	Use ldelf_map_segments.
	* emultempl/vms.em: Include ldelfgen.h.
	(gld${EMULATION_NAME}_after_allocation): Use ldelf_map_segments.
	* emultempl/elf32.em: Remove unnecessary headers, include ldelf.h
	and ldelfgen.h.  Move much of file content to..
	* ldelf.c: ..here.  New file.
	* ldelf.h: New file.
	* emultempl/elf-generic.em: Move gld${EMULATION_NAME}_map_segments..
	* ldelfgen.c: ..to here.
	* ldelfgen.h: New file.
	* ldlang.c (lang_for_each_input_file): Adjust to only call func
	on real files.
	(lang_for_each_file): Likewise.
	* po/SRC-POTFILES.in: Regenerate.
	* Makefile.in: Regenerate.
2019-09-11 13:44:22 +09:30
..
aarch64elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
aix.em lang_input_statement_type next pointers 2019-08-10 17:16:16 +09:30
alphaelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
arclinux.em [ARC] don't force _init/_fini as DT_INIT/DT_FINI. 2019-02-09 11:07:42 +01:00
armcoff.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
armelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
astring.sed
avrelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
beos.em beos.em qsort predicate tidy 2019-09-06 12:55:37 +09:30
bfin.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
cr16elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
crxelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
cskyelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
elf32.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
elf-generic.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
elf-x86.em x86: Move x86-specific linker options to elf_linker_x86_params 2019-04-06 07:25:31 -07:00
epiphanyelf_4x4.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
genelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
generic.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
hppaelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
ia64elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
irix.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
linux.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
m68hc1xelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
m68kelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
metagelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
mipself.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
mmix-elfnmmo.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
mmixelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
mmo.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
msp430.em MSP430 Linker: Define __crt0_init_bss/__crt0_movedata symbols when .lower or .either prefixed sections are present. 2019-04-17 15:05:08 +01:00
nds32elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
needrelax.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
netbsd.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
nios2elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
ostring.sed
pe.em bfd_get_filename 2019-09-06 12:22:59 +09:30
pep.em bfd_get_filename 2019-09-06 12:22:59 +09:30
ppc32elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
ppc64elf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
pruelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
README Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
riscvelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
rxelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
s390.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
scoreelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
solaris2-x86.em x86: Move x86-specific linker options to elf_linker_x86_params 2019-04-06 07:25:31 -07:00
solaris2.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
spu_icache.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_ovl.o_c Regenerate spu_ovl.o_c 2016-10-15 12:53:57 +10:30
spu_ovl.S Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
spuelf.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
tic6xdsbt.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
ticoff.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
v850elf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
vanilla.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
vms.em Move elf32.em and elf-generic.em functions 2019-09-11 13:44:22 +09:30
vxworks.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
xtensaelf.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
z80.em Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +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-2019 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.