binutils-gdb/ld/emultempl
Alan Modra 1a72702bb3 Return void from linker callbacks
The ldmain.c implementation of these linker callback functions always
return true, so any code handling a false return is dead.  What's
more, some of the bfd backends abort if ever a false return is seen,
and there seems to be some confusion in gdb's compile-object-load.c.
The return value was never meant to be "oh yes, a multiple_definition
error occurred", but rather "out of memory or other catastrophic
failure".

This patch removes the status return on the callbacks that always
return true.  I kept the return status for "notice" because that one
does happen to need to return "out of memory".

include/
	* bfdlink.h (struct bfd_link_callbacks): Update comments.
	Return void from multiple_definition, multiple_common,
	add_to_set, constructor, warning, undefined_symbol,
	reloc_overflow, reloc_dangerous and unattached_reloc.
bfd/
	* aoutx.h: Adjust linker callback calls throughout file,
	removing dead code.
	* bout.c: Likewise.
	* coff-alpha.c: Likewise.
	* coff-arm.c: Likewise.
	* coff-h8300.c: Likewise.
	* coff-h8500.c: Likewise.
	* coff-i960.c: Likewise.
	* coff-mcore.c: Likewise.
	* coff-mips.c: Likewise.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
	* coff-sh.c: Likewise.
	* coff-tic80.c: Likewise.
	* coff-w65.c: Likewise.
	* coff-z80.c: Likewise.
	* coff-z8k.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* cofflink.c: Likewise.
	* ecoff.c: Likewise.
	* elf-bfd.h: Likewise.
	* elf-m10200.c: Likewise.
	* elf-m10300.c: Likewise.
	* elf32-arc.c: Likewise.
	* elf32-arm.c: Likewise.
	* elf32-avr.c: Likewise.
	* elf32-bfin.c: Likewise.
	* elf32-cr16.c: Likewise.
	* elf32-cr16c.c: Likewise.
	* elf32-cris.c: Likewise.
	* elf32-crx.c: Likewise.
	* elf32-d10v.c: Likewise.
	* elf32-epiphany.c: Likewise.
	* elf32-fr30.c: Likewise.
	* elf32-frv.c: Likewise.
	* elf32-ft32.c: Likewise.
	* elf32-h8300.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-i860.c: Likewise.
	* elf32-ip2k.c: Likewise.
	* elf32-iq2000.c: Likewise.
	* elf32-lm32.c: Likewise.
	* elf32-m32c.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-m68hc1x.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mep.c: Likewise.
	* elf32-metag.c: Likewise.
	* elf32-microblaze.c: Likewise.
	* elf32-moxie.c: Likewise.
	* elf32-msp430.c: Likewise.
	* elf32-mt.c: Likewise.
	* elf32-nds32.c: Likewise.
	* elf32-nios2.c: Likewise.
	* elf32-or1k.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-score.c: Likewise.
	* elf32-score7.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-sh64.c: Likewise.
	* elf32-spu.c: Likewise.
	* elf32-tic6x.c: Likewise.
	* elf32-tilepro.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf32-vax.c: Likewise.
	* elf32-visium.c: Likewise.
	* elf32-xstormy16.c: Likewise.
	* elf32-xtensa.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-ia64-vms.c: Likewise.
	* elf64-mmix.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elflink.c: Likewise.
	* elfnn-aarch64.c: Likewise.
	* elfnn-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* elfxx-sparc.c: Likewise.
	* elfxx-tilegx.c: Likewise.
	* linker.c: Likewise.
	* pdp11.c: Likewise.
	* pe-mips.c: Likewise.
	* reloc.c: Likewise.
	* reloc16.c: Likewise.
	* simple.c: Likewise.
	* vms-alpha.c: Likewise.
	* xcofflink.c: Likewise.
	* elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
	status param.  Adjust calls to these and linker callbacks throughout.
	* elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
	get_ramstart): Delete status param.  Adjust calls to these and
	linker callbacks throughout.
ld/
	* ldmain.c (multiple_definition, multiple_common, add_to_set,
	constructor_callback, warning_callback, undefined_symbol,
	reloc_overflow, reloc_dangerous, unattached_reloc): Return void.
	* emultempl/elf32.em: Adjust callback calls.
gdb/
	* compile/compile-object-load.c (link_callbacks_multiple_definition,
	link_callbacks_warning, link_callbacks_undefined_symbol,
	link_callbacks_undefined_symbol, link_callbacks_reloc_overflow,
	link_callbacks_reloc_dangerous,
	link_callbacks_unattached_reloc): Return void.
2016-05-28 11:17:20 +09:30
..
README Copyright update for binutils 2016-01-01 23:00:01 +10:30
aarch64elf.em [AArch64] Also puts value in place for R_AARCH64_RELATIVE 2016-05-03 11:59:37 +01:00
aix.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
alphaelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
arclinux.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
armcoff.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
armelf.em Support for dedicated output section for some ARM veneer types 2016-05-23 09:38:32 +01:00
astring.sed
avrelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
beos.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
bfin.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
cr16elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
crxelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
elf-generic.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
elf32.em Return void from linker callbacks 2016-05-28 11:17:20 +09:30
epiphanyelf_4x4.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
genelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
generic.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
gld960.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
gld960c.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
hppaelf.em [HPPA] Attach linker created dynamic sections to stub bfd 2016-05-11 22:51:14 +09:30
ia64elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
irix.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
linux.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
lnk960.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
m68hc1xelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
m68kcoff.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
m68kelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
metagelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
mipself.em MIPS/LD: Convert ELF linker emulation option macros to an enum 2016-01-04 23:35:03 +00:00
mmix-elfnmmo.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
mmixelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
mmo.em Speedup mmo and pe orphan placement for relocatable link 2016-03-02 05:07:50 -08:00
msp430.em Remove use of alloca. 2016-03-21 16:31:46 +00:00
nds32elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
needrelax.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
netbsd.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
nios2elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
ostring.sed
pe.em Ignore DWARF debug information with a version of 0 - assume that it is padding. 2016-04-04 12:53:33 +01:00
pep.em Speedup mmo and pe orphan placement for relocatable link 2016-03-02 05:07:50 -08:00
ppc32elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
ppc64elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
rxelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
scoreelf.em update many old style function definitions 2016-04-20 07:04:49 -04:00
sh64elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
solaris2.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_icache.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spu_ovl.S Copyright update for binutils 2016-01-01 23:00:01 +10:30
spu_ovl.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spuelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
sunos.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
tic6xdsbt.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
ticoff.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
v850elf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
vanilla.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
vms.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
vxworks.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
xtensaelf.em Copyright update for binutils 2016-01-01 23:00:01 +10:30
z80.em Copyright update for binutils 2016-01-01 23:00:01 +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-2016 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.