This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Return void from linker callbacks
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org, gdb-cvs at sourceware dot org
- Date: 28 May 2016 01:53:15 -0000
- Subject: [binutils-gdb] Return void from linker callbacks
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1a72702bb30ec3f94627cfcae684823b413f20b9
commit 1a72702bb30ec3f94627cfcae684823b413f20b9
Author: Alan Modra <amodra@gmail.com>
Date: Fri May 27 17:20:55 2016 +0930
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.
Diff:
---
bfd/ChangeLog | 101 ++++++++++++++++++++++++++++++++++++++
bfd/aoutx.h | 66 ++++++++++---------------
bfd/bout.c | 8 ++-
bfd/coff-alpha.c | 69 +++++++++++---------------
bfd/coff-arm.c | 18 +++----
bfd/coff-h8300.c | 84 +++++++++++--------------------
bfd/coff-h8500.c | 26 ++++------
bfd/coff-i960.c | 29 +++++------
bfd/coff-mcore.c | 18 +++----
bfd/coff-mips.c | 34 ++++++-------
bfd/coff-ppc.c | 18 +++----
bfd/coff-rs6000.c | 24 ++++-----
bfd/coff-sh.c | 18 +++----
bfd/coff-tic80.c | 18 +++----
bfd/coff-w65.c | 25 ++++------
bfd/coff-z80.c | 26 ++++------
bfd/coff-z8k.c | 52 ++++++++------------
bfd/coff64-rs6000.c | 23 ++++-----
bfd/cofflink.c | 51 ++++++++-----------
bfd/ecoff.c | 23 +++------
bfd/elf-bfd.h | 11 ++---
bfd/elf-m10200.c | 21 +++-----
bfd/elf-m10300.c | 14 ++----
bfd/elf32-arc.c | 22 +++------
bfd/elf32-arm.c | 36 +++++---------
bfd/elf32-avr.c | 16 +++---
bfd/elf32-bfin.c | 20 +++-----
bfd/elf32-cr16.c | 20 +++-----
bfd/elf32-cr16c.c | 20 +++-----
bfd/elf32-cris.c | 14 ++----
bfd/elf32-crx.c | 20 +++-----
bfd/elf32-d10v.c | 20 +++-----
bfd/elf32-epiphany.c | 11 ++---
bfd/elf32-fr30.c | 14 ++----
bfd/elf32-frv.c | 7 +--
bfd/elf32-ft32.c | 14 ++----
bfd/elf32-h8300.c | 20 +++-----
bfd/elf32-hppa.c | 16 +++---
bfd/elf32-i370.c | 16 +++---
bfd/elf32-i386.c | 10 ++--
bfd/elf32-i860.c | 11 ++---
bfd/elf32-ip2k.c | 11 ++---
bfd/elf32-iq2000.c | 11 ++---
bfd/elf32-lm32.c | 19 +++----
bfd/elf32-m32c.c | 23 +++------
bfd/elf32-m32r.c | 32 +++++-------
bfd/elf32-m68hc1x.c | 49 +++++++-----------
bfd/elf32-m68k.c | 10 ++--
bfd/elf32-mep.c | 11 ++---
bfd/elf32-metag.c | 14 ++----
bfd/elf32-microblaze.c | 17 +++----
bfd/elf32-moxie.c | 14 ++----
bfd/elf32-msp430.c | 16 +++---
bfd/elf32-mt.c | 11 ++---
bfd/elf32-nds32.c | 44 +++++++----------
bfd/elf32-nios2.c | 18 +++----
bfd/elf32-or1k.c | 11 ++---
bfd/elf32-ppc.c | 23 ++++-----
bfd/elf32-rl78.c | 45 ++++++-----------
bfd/elf32-rx.c | 50 ++++++++-----------
bfd/elf32-s390.c | 11 ++---
bfd/elf32-score.c | 30 +++++------
bfd/elf32-score7.c | 30 +++++------
bfd/elf32-sh.c | 29 +++++------
bfd/elf32-sh64.c | 8 ++-
bfd/elf32-spu.c | 30 +++++------
bfd/elf32-tic6x.c | 24 ++++-----
bfd/elf32-tilepro.c | 14 ++----
bfd/elf32-v850.c | 20 +++-----
bfd/elf32-vax.c | 8 ++-
bfd/elf32-visium.c | 11 ++---
bfd/elf32-xstormy16.c | 14 ++----
bfd/elf32-xtensa.c | 61 +++++++++--------------
bfd/elf64-alpha.c | 8 ++-
bfd/elf64-hppa.c | 28 +++++------
bfd/elf64-ia64-vms.c | 24 +++++----
bfd/elf64-mmix.c | 15 ++----
bfd/elf64-ppc.c | 12 ++---
bfd/elf64-s390.c | 11 ++---
bfd/elf64-sh64.c | 29 +++++------
bfd/elf64-x86-64.c | 10 ++--
bfd/elflink.c | 44 ++++++-----------
bfd/elfnn-aarch64.c | 30 +++++------
bfd/elfnn-ia64.c | 24 +++++----
bfd/elfxx-mips.c | 47 ++++++++----------
bfd/elfxx-sparc.c | 8 ++-
bfd/elfxx-tilegx.c | 14 ++----
bfd/linker.c | 71 +++++++++++----------------
bfd/pdp11.c | 47 +++++++-----------
bfd/pe-mips.c | 9 ++--
bfd/reloc.c | 26 +++++-----
bfd/reloc16.c | 8 ++-
bfd/simple.c | 18 +++----
bfd/vms-alpha.c | 5 +-
bfd/xcofflink.c | 50 ++++++++-----------
gdb/ChangeLog | 8 +++
gdb/compile/compile-object-load.c | 22 +++------
include/ChangeLog | 7 +++
include/bfdlink.h | 27 +++++-----
ld/ChangeLog | 7 +++
ld/emultempl/elf32.em | 9 ++--
ld/ldmain.c | 72 +++++++++++----------------
102 files changed, 1026 insertions(+), 1467 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cefe44a..4ce81a6 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,104 @@
+2016-05-28 Alan Modra <amodra@gmail.com>
+
+ * 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.
+
2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
* elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 61ac9b3..75ba68b 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -3735,9 +3735,8 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo,
}
else
{
- if (! ((*flaginfo->info->callbacks->unattached_reloc)
- (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0)))
- return FALSE;
+ (*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, pr->u.name, NULL, NULL, (bfd_vma) 0);
r_index = 0;
}
}
@@ -3832,17 +3831,13 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo,
case bfd_reloc_outofrange:
abort ();
case bfd_reloc_overflow:
- if (! ((*flaginfo->info->callbacks->reloc_overflow)
- (flaginfo->info, NULL,
- (p->type == bfd_section_reloc_link_order
- ? bfd_section_name (flaginfo->output_bfd,
- pr->u.section)
- : pr->u.name),
- howto->name, pr->addend, NULL, NULL, (bfd_vma) 0)))
- {
- free (buf);
- return FALSE;
- }
+ (*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, NULL,
+ (p->type == bfd_section_reloc_link_order
+ ? bfd_section_name (flaginfo->output_bfd,
+ pr->u.section)
+ : pr->u.name),
+ howto->name, pr->addend, NULL, NULL, (bfd_vma) 0);
break;
}
ok = bfd_set_section_contents (flaginfo->output_bfd, o, (void *) buf,
@@ -4099,10 +4094,9 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo,
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
- if (! ((*flaginfo->info->callbacks->unattached_reloc)
- (flaginfo->info, name, input_bfd, input_section,
- r_addr)))
- return FALSE;
+ (*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, name,
+ input_bfd, input_section, r_addr);
r_index = 0;
}
}
@@ -4224,10 +4218,8 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo,
name = h->root.root.string;
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
- if (! ((*flaginfo->info->callbacks->undefined_symbol)
- (flaginfo->info, name, input_bfd, input_section,
- r_addr, TRUE)))
- return FALSE;
+ (*flaginfo->info->callbacks->undefined_symbol)
+ (flaginfo->info, name, input_bfd, input_section, r_addr, TRUE);
}
r = MY_final_link_relocate (howto,
@@ -4259,11 +4251,9 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo,
s = aout_reloc_index_to_section (input_bfd, r_index);
name = bfd_section_name (input_bfd, s);
}
- if (! ((*flaginfo->info->callbacks->reloc_overflow)
- (flaginfo->info, (h ? &h->root : NULL), name,
- howto->name, (bfd_vma) 0, input_bfd,
- input_section, r_addr)))
- return FALSE;
+ (*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, r_addr);
}
break;
}
@@ -4441,10 +4431,9 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo,
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
- if (! ((*flaginfo->info->callbacks->unattached_reloc)
- (flaginfo->info, name, input_bfd, input_section,
- r_addr)))
- return FALSE;
+ (*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, name,
+ input_bfd, input_section, r_addr);
r_index = 0;
}
}
@@ -4631,10 +4620,8 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo,
name = h->root.root.string;
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
- if (! ((*flaginfo->info->callbacks->undefined_symbol)
- (flaginfo->info, name, input_bfd, input_section,
- r_addr, TRUE)))
- return FALSE;
+ (*flaginfo->info->callbacks->undefined_symbol)
+ (flaginfo->info, name, input_bfd, input_section, r_addr, TRUE);
}
if (r_type != (unsigned int) RELOC_SPARC_REV32)
@@ -4678,11 +4665,10 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo,
s = aout_reloc_index_to_section (input_bfd, r_index);
name = bfd_section_name (input_bfd, s);
}
- if (! ((*flaginfo->info->callbacks->reloc_overflow)
- (flaginfo->info, (h ? &h->root : NULL), name,
- howto_table_ext[r_type].name,
- r_addend, input_bfd, input_section, r_addr)))
- return FALSE;
+ (*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, (h ? &h->root : NULL), name,
+ howto_table_ext[r_type].name,
+ r_addend, input_bfd, input_section, r_addr);
}
break;
}
diff --git a/bfd/bout.c b/bfd/bout.c
index 0718d3e..99749f1 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -517,11 +517,9 @@ get_value (arelent *reloc,
value = h->u.c.size;
else
{
- if (! ((*link_info->callbacks->undefined_symbol)
- (link_info, bfd_asymbol_name (symbol),
- input_section->owner, input_section, reloc->address,
- TRUE)))
- abort ();
+ (*link_info->callbacks->undefined_symbol)
+ (link_info, bfd_asymbol_name (symbol),
+ input_section->owner, input_section, reloc->address, TRUE);
value = 0;
}
}
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 55fd350..16edc5f 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -1101,24 +1101,19 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd,
switch (r)
{
case bfd_reloc_undefined:
- if (! ((*link_info->callbacks->undefined_symbol)
- (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
- input_bfd, input_section, rel->address, TRUE)))
- goto error_return;
+ (*link_info->callbacks->undefined_symbol)
+ (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
+ input_bfd, input_section, rel->address, TRUE);
break;
case bfd_reloc_dangerous:
- if (! ((*link_info->callbacks->reloc_dangerous)
- (link_info, err, input_bfd, input_section,
- rel->address)))
- goto error_return;
+ (*link_info->callbacks->reloc_dangerous)
+ (link_info, err, input_bfd, input_section, rel->address);
break;
case bfd_reloc_overflow:
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*rel->sym_ptr_ptr),
- rel->howto->name, rel->addend, input_bfd,
- input_section, rel->address)))
- goto error_return;
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*rel->sym_ptr_ptr),
+ rel->howto->name, rel->addend, input_bfd,
+ input_section, rel->address);
break;
case bfd_reloc_outofrange:
default:
@@ -1696,10 +1691,9 @@ alpha_relocate_section (bfd *output_bfd,
do not have a meaningful number for the
location within the section that is being
relocated. */
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, (bfd_vma) 0, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, (bfd_vma) 0, TRUE);
addend = 0;
}
}
@@ -1712,10 +1706,9 @@ alpha_relocate_section (bfd *output_bfd,
/* This symbol is not being written out. Pass
the address as 0, as with undefined_symbol,
above. */
- if (! ((*info->callbacks->unattached_reloc)
- (info, h->root.root.string, input_bfd,
- input_section, (bfd_vma) 0)))
- return FALSE;
+ (*info->callbacks->unattached_reloc)
+ (info, h->root.root.string,
+ input_bfd, input_section, (bfd_vma) 0);
}
addend = alpha_convert_external_reloc (output_bfd, info,
@@ -1839,10 +1832,9 @@ alpha_relocate_section (bfd *output_bfd,
&& h->indx == -1)
{
/* This symbol is not being written out. */
- if (! ((*info->callbacks->unattached_reloc)
- (info, h->root.root.string, input_bfd,
- input_section, r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->unattached_reloc)
+ (info, h->root.root.string, input_bfd,
+ input_section, r_vaddr - input_section->vma);
}
relocation = alpha_convert_external_reloc (output_bfd,
@@ -1896,11 +1888,9 @@ alpha_relocate_section (bfd *output_bfd,
}
else
{
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section,
- r_vaddr - input_section->vma, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ r_vaddr - input_section->vma, TRUE);
relocation = 0;
}
}
@@ -1942,12 +1932,10 @@ alpha_relocate_section (bfd *output_bfd,
else
name = bfd_section_name (input_bfd,
symndx_to_section[r_symndx]);
- if (! ((*info->callbacks->reloc_overflow)
- (info, NULL, name,
- alpha_howto_table[r_type].name,
- (bfd_vma) 0, input_bfd, input_section,
- r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, NULL, name, alpha_howto_table[r_type].name,
+ (bfd_vma) 0, input_bfd, input_section,
+ r_vaddr - input_section->vma);
}
break;
}
@@ -1967,10 +1955,9 @@ alpha_relocate_section (bfd *output_bfd,
if (gp_usedp && gp_undefined)
{
- if (! ((*info->callbacks->reloc_dangerous)
- (info, _("GP relative relocation used when GP not defined"),
- input_bfd, input_section, r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_dangerous)
+ (info, _("GP relative relocation used when GP not defined"),
+ input_bfd, input_section, r_vaddr - input_section->vma);
/* Only give the error once per link. */
gp = 4;
_bfd_set_gp_value (output_bfd, gp);
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 1b2c239..34ae35c 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1562,12 +1562,9 @@ coff_arm_relocate_section (bfd *output_bfd,
}
else if (! bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
}
/* Emit a reloc if the backend thinks it needs it. */
@@ -1764,11 +1761,10 @@ coff_arm_relocate_section (bfd *output_bfd,
return FALSE;
}
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
}
}
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index 66de2be..c258306 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -647,14 +647,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Sanity check. */
if (gap < -128 || gap > 126)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
/* Everything looks OK. Apply the relocation and update the
src/dst address appropriately. */
@@ -679,14 +675,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Sanity check. */
if (gap > 32766 || gap < -32768)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
/* Everything looks OK. Apply the relocation and update the
src/dst address appropriately. */
@@ -769,14 +761,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
src_address += 4;
}
else
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
break;
/* A 16-bit absolute branch that is now an 8-bit pc-relative branch. */
@@ -793,14 +781,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Sanity check. */
if (gap < -128 || gap > 126)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
/* Now fix the instruction itself. */
switch (data[dst_address - 1])
@@ -840,14 +824,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Sanity check. */
if (gap < -128 || gap > 126)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
/* Now fix the instruction. */
switch (data[dst_address - 2])
@@ -1040,14 +1020,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
/* Sanity check. */
if (gap < -128 || gap > 126)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
/* Everything looks OK. Fix the condition in the instruction, apply
the relocation, and update the src/dst address appropriately. */
@@ -1123,14 +1099,10 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
src_address += 1;
}
else
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
break;
}
diff --git a/bfd/coff-h8500.c b/bfd/coff-h8500.c
index 8a72af6..1b14634 100644
--- a/bfd/coff-h8500.c
+++ b/bfd/coff-h8500.c
@@ -244,14 +244,11 @@ extra_case (bfd *in_abfd,
word and the pc's been incremented. */
if (gap > 128 || gap < -128)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_8 (in_abfd, gap, data + *dst_ptr);
(*dst_ptr)++;
(*src_ptr)++;
@@ -268,14 +265,11 @@ extra_case (bfd *in_abfd,
word and the pc's been incremented. */
if (gap > 32767 || gap < -32768)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_16 (in_abfd, (bfd_vma) gap, data + *dst_ptr);
(*dst_ptr) += 2;
(*src_ptr) += 2;
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index 96704c6..b2c1512 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -448,12 +448,9 @@ coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ sec->output_offset);
}
else if (! bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
}
done = FALSE;
@@ -473,12 +470,11 @@ coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
/* This symbol is apparently not from a COFF input file.
We warn, and then assume that it is not a leaf
function. */
- if (! ((*info->callbacks->reloc_dangerous)
- (info,
- _("uncertain calling convention for non-COFF symbol"),
- input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_dangerous)
+ (info,
+ _("uncertain calling convention for non-COFF symbol"),
+ input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
break;
case C_LEAFSTAT:
case C_LEAFEXT:
@@ -555,11 +551,10 @@ coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
}
}
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index a99d4fd..002c908 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -454,12 +454,9 @@ coff_mcore_relocate_section (bfd * output_bfd,
+ sec->output_offset);
}
else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
my_name = h->root.root.string;
}
@@ -519,11 +516,10 @@ coff_mcore_relocate_section (bfd * output_bfd,
break;
case bfd_reloc_overflow:
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), my_name, howto->name,
- (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), my_name, howto->name,
+ (bfd_vma) 0, input_bfd,
+ input_section, rel->r_vaddr - input_section->vma);
}
}
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 9f730a4..dbdf08c 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -940,11 +940,10 @@ mips_relocate_section (bfd *output_bfd,
{
if (gp_undefined)
{
- if (! ((*info->callbacks->reloc_dangerous)
- (info, _("GP relative relocation used when GP not defined"),
- input_bfd, input_section,
- int_rel.r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_dangerous)
+ (info, _("GP relative relocation used when GP not defined"),
+ input_bfd, input_section,
+ int_rel.r_vaddr - input_section->vma);
/* Only give the error once per link. */
gp = 4;
_bfd_set_gp_value (output_bfd, gp);
@@ -1075,11 +1074,9 @@ mips_relocate_section (bfd *output_bfd,
if (int_rel.r_symndx == -1)
{
/* This symbol is not being written out. */
- if (! ((*info->callbacks->unattached_reloc)
- (info, h->root.root.string, input_bfd,
- input_section,
- int_rel.r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->unattached_reloc)
+ (info, h->root.root.string, input_bfd, input_section,
+ int_rel.r_vaddr - input_section->vma);
int_rel.r_symndx = 0;
}
relocation = 0;
@@ -1151,11 +1148,9 @@ mips_relocate_section (bfd *output_bfd,
}
else
{
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section,
- int_rel.r_vaddr - input_section->vma, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ int_rel.r_vaddr - input_section->vma, TRUE);
relocation = 0;
}
}
@@ -1223,11 +1218,10 @@ mips_relocate_section (bfd *output_bfd,
name = NULL;
else
name = bfd_section_name (input_bfd, s);
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- int_rel.r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ int_rel.r_vaddr - input_section->vma);
}
break;
}
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 784e6f0..a931f6a 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1026,12 +1026,9 @@ coff_ppc_relocate_section (bfd *output_bfd,
+ sec->output_offset);
}
else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
}
rstat = bfd_reloc_ok;
@@ -1423,11 +1420,10 @@ coff_ppc_relocate_section (bfd *output_bfd,
name = buf;
}
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root.root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root.root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
}
}
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index ffef1ba..84860db 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -3367,15 +3367,12 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
{
if (info->unresolved_syms_in_objects != RM_IGNORE
&& (h->flags & XCOFF_WAS_UNDEFINED) != 0)
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string,
- input_bfd, input_section,
- rel->r_vaddr - input_section->vma,
- (info->unresolved_syms_in_objects
- == RM_GENERATE_ERROR))))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string,
+ input_bfd, input_section,
+ rel->r_vaddr - input_section->vma,
+ info->unresolved_syms_in_objects == RM_GENERATE_ERROR);
+
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -3455,11 +3452,10 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
}
sprintf (reloc_type_name, "0x%02x", rel->r_type);
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, reloc_type_name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, reloc_type_name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
/* Add RELOCATION to the right bits of VALUE_TO_RELOCATE. */
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 3e0cb7f..cf37ad2 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -2837,12 +2837,9 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ sec->output_offset);
}
else if (! bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
}
rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
@@ -2875,11 +2872,10 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
name = buf;
}
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
}
}
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 49647bd..99808f1 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -563,12 +563,9 @@ coff_tic80_relocate_section (bfd *output_bfd,
}
else if (! bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
}
addr = rel->r_vaddr - input_section->vma;
@@ -688,11 +685,10 @@ coff_tic80_relocate_section (bfd *output_bfd,
return FALSE;
}
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
}
}
diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c
index b0d973a..e73672a 100644
--- a/bfd/coff-w65.c
+++ b/bfd/coff-w65.c
@@ -315,14 +315,11 @@ w65_reloc16_extra_cases (bfd *abfd,
gap -= dot + 1;
if (gap < -128 || gap > 127)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_8 (abfd, gap, data + dst_address);
dst_address += 1;
src_address += 1;
@@ -340,14 +337,10 @@ w65_reloc16_extra_cases (bfd *abfd,
/* This wraps within the page, so ignore the relativeness, look at the
high part. */
if ((gap & 0xf0000) != (dot & 0xf0000))
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
gap -= dot + 2;
bfd_put_16 (abfd, gap, data + dst_address);
diff --git a/bfd/coff-z80.c b/bfd/coff-z80.c
index 13fd6aa..2cab117 100644
--- a/bfd/coff-z80.c
+++ b/bfd/coff-z80.c
@@ -188,14 +188,11 @@ extra_case (bfd *in_abfd,
val = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
if (val>127 || val<-128) /* Test for overflow. */
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_8 (in_abfd, val, data + *dst_ptr);
(*dst_ptr) += 1;
(*src_ptr) += 1;
@@ -247,14 +244,11 @@ extra_case (bfd *in_abfd,
the offset. */
if (gap >= 128 || gap < -128)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_8 (in_abfd, gap, data + *dst_ptr);
(*dst_ptr)++;
(*src_ptr)++;
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index 676fee7..5f7f952 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -264,14 +264,11 @@ extra_case (bfd *in_abfd,
abort ();
gap /= 2;
if (gap > 128 || gap < -128)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_8 (in_abfd, gap, data + *dst_ptr);
(*dst_ptr)++;
(*src_ptr)++;
@@ -293,14 +290,11 @@ extra_case (bfd *in_abfd,
gap /= 2;
if (gap > 0 || gap < -127)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_8 (in_abfd,
(bfd_get_8 ( in_abfd, data + *dst_ptr) & 0x80) + (-gap & 0x7f),
data + *dst_ptr);
@@ -321,14 +315,11 @@ extra_case (bfd *in_abfd,
if (gap & 1)
abort ();
if (gap > 4096 || gap < -4095)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
gap /= 2;
bfd_put_16 (in_abfd,
(bfd_get_16 ( in_abfd, data + *dst_ptr) & 0xf000) | (-gap & 0x0fff),
@@ -348,14 +339,11 @@ extra_case (bfd *in_abfd,
int gap = dst - dot - 2;
if (gap > 32767 || gap < -32768)
- {
- if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*reloc->sym_ptr_ptr),
- reloc->howto->name, reloc->addend, input_section->owner,
- input_section, reloc->address)))
- abort ();
- }
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ reloc->howto->name, reloc->addend, input_section->owner,
+ input_section, reloc->address);
+
bfd_put_16 (in_abfd, (bfd_vma) gap, data + *dst_ptr);
(*dst_ptr) += 2;
(*src_ptr) += 2;
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 7b5bb24..f2a3c16 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1250,15 +1250,11 @@ xcoff64_ppc_relocate_section (bfd *output_bfd,
{
if (info->unresolved_syms_in_objects != RM_IGNORE
&& (h->flags & XCOFF_WAS_UNDEFINED) != 0)
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string,
- input_bfd, input_section,
- rel->r_vaddr - input_section->vma,
- (info->unresolved_syms_in_objects
- == RM_GENERATE_ERROR))))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma,
+ info->unresolved_syms_in_objects == RM_GENERATE_ERROR);
+
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -1337,11 +1333,10 @@ xcoff64_ppc_relocate_section (bfd *output_bfd,
}
sprintf (reloc_type_name, "0x%02x", rel->r_type);
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, reloc_type_name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, reloc_type_name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
/* Add RELOCATION to the right bits of VALUE_TO_RELOCATE. */
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index b8a85b0..bcdf778 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -2515,10 +2515,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
if (name == NULL)
return FALSE;
- if (! ((*flaginfo->info->callbacks->unattached_reloc)
- (flaginfo->info, name, input_bfd, o,
- irel->r_vaddr)))
- return FALSE;
+ (*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, name, input_bfd, o, irel->r_vaddr);
}
}
}
@@ -2834,18 +2832,14 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
case bfd_reloc_outofrange:
abort ();
case bfd_reloc_overflow:
- if (! ((*flaginfo->info->callbacks->reloc_overflow)
- (flaginfo->info, NULL,
- (link_order->type == bfd_section_reloc_link_order
- ? bfd_section_name (output_bfd,
- link_order->u.reloc.p->u.section)
- : link_order->u.reloc.p->u.name),
- howto->name, link_order->u.reloc.p->addend,
- (bfd *) NULL, (asection *) NULL, (bfd_vma) 0)))
- {
- free (buf);
- return FALSE;
- }
+ (*flaginfo->info->callbacks->reloc_overflow)
+ (flaginfo->info, NULL,
+ (link_order->type == bfd_section_reloc_link_order
+ ? bfd_section_name (output_bfd,
+ link_order->u.reloc.p->u.section)
+ : link_order->u.reloc.p->u.name),
+ howto->name, link_order->u.reloc.p->addend,
+ (bfd *) NULL, (asection *) NULL, (bfd_vma) 0);
break;
}
loc = link_order->offset * bfd_octets_per_byte (output_bfd);
@@ -2901,10 +2895,9 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
}
else
{
- if (! ((*flaginfo->info->callbacks->unattached_reloc)
- (flaginfo->info, link_order->u.reloc.p->u.name, (bfd *) NULL,
- (asection *) NULL, (bfd_vma) 0)))
- return FALSE;
+ (*flaginfo->info->callbacks->unattached_reloc)
+ (flaginfo->info, link_order->u.reloc.p->u.name,
+ (bfd *) NULL, (asection *) NULL, (bfd_vma) 0);
irel->r_symndx = 0;
}
}
@@ -3069,12 +3062,9 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
}
else if (! bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_vaddr - input_section->vma, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma, TRUE);
}
/* If the input section defining the symbol has been discarded
@@ -3144,11 +3134,10 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
return FALSE;
}
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma);
}
}
}
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index d618572..4515172 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -4015,17 +4015,12 @@ ecoff_reloc_link_order (bfd *output_bfd,
case bfd_reloc_outofrange:
abort ();
case bfd_reloc_overflow:
- if (! ((*info->callbacks->reloc_overflow)
- (info, NULL,
- (link_order->type == bfd_section_reloc_link_order
- ? bfd_section_name (output_bfd, section)
- : link_order->u.reloc.p->u.name),
- rel.howto->name, addend, NULL,
- NULL, (bfd_vma) 0)))
- {
- free (buf);
- return FALSE;
- }
+ (*info->callbacks->reloc_overflow)
+ (info, NULL,
+ (link_order->type == bfd_section_reloc_link_order
+ ? bfd_section_name (output_bfd, section)
+ : link_order->u.reloc.p->u.name),
+ rel.howto->name, addend, NULL, NULL, (bfd_vma) 0);
break;
}
ok = bfd_set_section_contents (output_bfd, output_section, (void *) buf,
@@ -4055,10 +4050,8 @@ ecoff_reloc_link_order (bfd *output_bfd,
in.r_symndx = h->indx;
else
{
- if (! ((*info->callbacks->unattached_reloc)
- (info, link_order->u.reloc.p->u.name, NULL,
- NULL, (bfd_vma) 0)))
- return FALSE;
+ (*info->callbacks->unattached_reloc)
+ (info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0);
in.r_symndx = 0;
}
in.r_extern = 1;
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index fc552ad..3184e57 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2594,12 +2594,11 @@ extern asection _bfd_elf_large_com_section;
bfd_boolean err; \
err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT); \
- if (!info->callbacks->undefined_symbol (info, \
- h->root.root.string, \
- input_bfd, \
- input_section, \
- rel->r_offset, err)) \
- return FALSE; \
+ (*info->callbacks->undefined_symbol) (info, \
+ h->root.root.string, \
+ input_bfd, \
+ input_section, \
+ rel->r_offset, err); \
warned = TRUE; \
} \
(void) unresolved_reloc; \
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 871f676..c2e8b98 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -410,18 +410,15 @@ mn10200_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (! ((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol) (info, name, input_bfd,
+ input_section,
+ rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -441,10 +438,8 @@ mn10200_elf_relocate_section (bfd *output_bfd,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index c1936eb..4b1ca58 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -2151,18 +2151,14 @@ mn10300_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root.root : NULL), name,
- howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root.root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (! ((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 1e012e2..08949c7 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1462,25 +1462,19 @@ elf_arc_relocate_section (bfd * output_bfd,
{
/* Fail if it is linking for PIE and the symbol is
undefined. */
- if (bfd_link_executable (info)
- && !(*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_offset, TRUE))
- {
- return FALSE;
- }
+ if (bfd_link_executable (info))
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_offset, TRUE);
reloc_data.sym_value = h->plt.offset;
reloc_data.sym_section = htab->splt;
reloc_data.should_relocate = TRUE;
}
- else if (!bfd_link_pic (info)
- && !(*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_offset, TRUE))
- {
- return FALSE;
- }
+ else if (!bfd_link_pic (info))
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ rel->r_offset, TRUE);
}
if (h->got.glist != NULL)
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 6375ae4..20a1989 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -11509,14 +11509,11 @@ elf32_arm_relocate_section (bfd * output_bfd,
&& r_symndx != STN_UNDEF
&& bfd_is_und_section (sec)
&& ELF_ST_BIND (sym->st_info) != STB_WEAK)
- {
- if (!info->callbacks->undefined_symbol
- (info, bfd_elf_string_from_elf_section
- (input_bfd, symtab_hdr->sh_link, sym->st_name),
- input_bfd, input_section,
- rel->r_offset, TRUE))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name),
+ input_bfd, input_section,
+ rel->r_offset, TRUE);
if (globals->use_rel)
{
@@ -11736,20 +11733,15 @@ elf32_arm_relocate_section (bfd * output_bfd,
/* If the overflowing reloc was to an undefined symbol,
we have already printed one error message and there
is no point complaining again. */
- if ((! h ||
- h->root.type != bfd_link_hash_undefined)
- && (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset))))
- return FALSE;
+ if (!h || h->root.type != bfd_link_hash_undefined)
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -11770,10 +11762,8 @@ elf32_arm_relocate_section (bfd * output_bfd,
common_error:
BFD_ASSERT (error_message != NULL);
- if (!((*info->callbacks->reloc_dangerous)
- (info, error_message, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_dangerous)
+ (info, error_message, input_bfd, input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 764d0d1..d463d78 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1487,14 +1487,13 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
- (info, (h ? &h->root : NULL),
- name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -1516,11 +1515,8 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index b2fcf38..d7d096a 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -1623,12 +1623,9 @@ bfin_relocate_section (bfd * output_bfd,
}
if (r == bfd_reloc_overflow)
- {
- if (!(info->callbacks->reloc_overflow
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
- return FALSE;
- }
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
else
{
(*_bfd_error_handler)
@@ -3209,13 +3206,13 @@ bfinfdpic_relocate_section (bfd * output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -3237,11 +3234,8 @@ bfinfdpic_relocate_section (bfd * output_bfd,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index 20015a4..9408024 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -1472,18 +1472,14 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -1503,10 +1499,8 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* Fall through. */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c
index ef981360..d3f56f1 100644
--- a/bfd/elf32-cr16c.c
+++ b/bfd/elf32-cr16c.c
@@ -765,18 +765,14 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -796,10 +792,8 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 4aa1d45..e759745d 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1973,7 +1973,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), symname, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
if (additional_relocation_error_msg_count > 0)
@@ -2010,9 +2010,8 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, symname, input_bfd, input_section, rel->r_offset,
- TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, symname, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -2033,11 +2032,8 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, symname, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, symname, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c
index 65b9355..cc8bedf 100644
--- a/bfd/elf32-crx.c
+++ b/bfd/elf32-crx.c
@@ -909,18 +909,14 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -940,10 +936,8 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* Fall through. */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index f0629b7..f6d4b0e 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -498,18 +498,14 @@ elf32_d10v_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -529,10 +525,8 @@ elf32_d10v_relocate_section (bfd *output_bfd,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c
index 25ed0fe..420dc8b 100644
--- a/bfd/elf32-epiphany.c
+++ b/bfd/elf32-epiphany.c
@@ -547,13 +547,13 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -578,11 +578,8 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index 0ae09f1..7dd4ca4 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -576,15 +576,14 @@ fr30_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, name, input_bfd, input_section, rel->r_offset,
- TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -605,11 +604,8 @@ fr30_elf_relocate_section (bfd *output_bfd,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index e0e3806..5990faa 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -4031,13 +4031,13 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -4065,9 +4065,6 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
input_bfd, input_section, rel->r_offset, name, msg);
return FALSE;
}
-
- if (! r)
- return FALSE;
}
}
diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index 47f80c3..9c5f734 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -320,15 +320,14 @@ ft32_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, name, input_bfd, input_section, rel->r_offset,
- TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -349,11 +348,8 @@ ft32_elf_relocate_section (bfd *output_bfd,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 9996cb3..5368385 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -507,18 +507,14 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
switch (r)
{
case bfd_reloc_overflow:
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (! ((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -538,10 +534,8 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index d67a40e..be10c9b 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3733,10 +3733,9 @@ elf32_hppa_relocate_section (bfd *output_bfd,
&& ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT
&& eh->type == STT_PARISC_MILLI)
{
- if (! info->callbacks->undefined_symbol
- (info, eh_name (eh), input_bfd,
- input_section, rela->r_offset, FALSE))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, eh_name (eh), input_bfd,
+ input_section, rela->r_offset, FALSE);
warned_undef = TRUE;
}
}
@@ -4311,12 +4310,9 @@ elf32_hppa_relocate_section (bfd *output_bfd,
}
}
else
- {
- if (!((*info->callbacks->reloc_overflow)
- (info, (hh ? &hh->eh.root : NULL), sym_name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, rela->r_offset)))
- return FALSE;
- }
+ (*info->callbacks->reloc_overflow)
+ (info, (hh ? &hh->eh.root : NULL), sym_name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rela->r_offset);
}
return TRUE;
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 9fd7219..4f6d727 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -1137,15 +1137,13 @@ i370_elf_relocate_section (bfd *output_bfd,
;
else if (!bfd_link_relocatable (info))
{
- if ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
- || ELF_ST_VISIBILITY (h->other))))
- {
- ret = FALSE;
- continue;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+ || ELF_ST_VISIBILITY (h->other)));
+ ret = FALSE;
+ continue;
}
}
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 8766d2b..d46ece7 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -4961,13 +4961,9 @@ check_relocation_error:
}
if (r == bfd_reloc_overflow)
- {
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
- }
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
else
{
(*_bfd_error_handler)
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index 371bf94..089d831 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -1196,13 +1196,13 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -1224,11 +1224,8 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 97cb633..820e146 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1458,13 +1458,13 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -1489,11 +1489,8 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index 642c929..0f7a75d 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -678,13 +678,13 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -706,11 +706,8 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index bdeefcf..0c79397 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -1149,17 +1149,14 @@ lm32_elf_relocate_section (bfd *output_bfd,
if ((h != NULL)
&& (h->root.type == bfd_link_hash_undefweak))
break;
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (! ((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -1179,10 +1176,8 @@ lm32_elf_relocate_section (bfd *output_bfd,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c
index 8436fb1..635d664 100644
--- a/bfd/elf32-m32c.c
+++ b/bfd/elf32-m32c.c
@@ -478,12 +478,9 @@ m32c_elf_relocate_section
else if (h->root.type == bfd_link_hash_undefweak)
;
else if (!bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset, TRUE)))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol) (info, h->root.root.string,
+ input_bfd, input_section,
+ rel->r_offset, TRUE);
}
if (sec != NULL && discarded_section (sec))
@@ -613,15 +610,14 @@ m32c_elf_relocate_section
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, name, input_bfd, input_section, rel->r_offset,
- TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -642,11 +638,8 @@ m32c_elf_relocate_section
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 22f3b1e..7034c3d 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -2580,14 +2580,11 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
;
else if (!bfd_link_relocatable (info))
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, offset,
- (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- }
+ (*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, offset,
+ (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+ || ELF_ST_VISIBILITY (h->other)));
}
if (sec != NULL && discarded_section (sec))
@@ -3062,17 +3059,14 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- if (! ((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, offset);
break;
case bfd_reloc_undefined:
- if (! ((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -3092,10 +3086,8 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, errmsg, name, input_bfd, input_section,
- offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, errmsg, name, input_bfd,
+ input_section, offset);
break;
}
}
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 912efdf..4824fde 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -958,7 +958,6 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
bfd_vma val;
const char * msg;
char * buf;
- bfd_boolean res;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
@@ -1121,8 +1120,8 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
buf = xmalloc (strlen (msg) + strlen (name) + 10);
sprintf (buf, msg, name);
- (* info->callbacks->warning)
- (info, buf, name, input_bfd, NULL, rel->r_offset);
+ (*info->callbacks->warning)
+ (info, buf, name, input_bfd, NULL, rel->r_offset);
free (buf);
}
@@ -1156,11 +1155,9 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
"code.");
buf = xmalloc (strlen (msg) + 128);
sprintf (buf, msg, phys_addr);
- res = (*info->callbacks->warning) (info, buf, name, input_bfd,
- input_section, insn_addr);
+ (*info->callbacks->warning) (info, buf, name, input_bfd,
+ input_section, insn_addr);
free (buf);
- if (! res)
- return FALSE;
break;
}
}
@@ -1176,11 +1173,9 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
(long) (relocation + rel->r_addend),
insn_page, m68hc11_phys_addr (pinfo, insn_addr),
(long) (insn_addr));
- res = (*info->callbacks->warning)
- (info, buf, name, input_bfd, input_section, rel->r_offset);
+ (*info->callbacks->warning) (info, buf, name, input_bfd,
+ input_section, rel->r_offset);
free (buf);
- if (! res)
- return FALSE;
break;
}
@@ -1190,12 +1185,9 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
"normal address space at %04lx");
buf = xmalloc (strlen (msg) + 128);
sprintf (buf, msg, phys_page, phys_addr, insn_addr);
- res = (*info->callbacks->warning)
- (info, buf, name, input_bfd, input_section, insn_addr);
+ (*info->callbacks->warning) (info, buf, name, input_bfd,
+ input_section, insn_addr);
free (buf);
- if (! res)
- return FALSE;
-
relocation = phys_addr;
break;
}
@@ -1235,11 +1227,9 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
"offset the address in your code");
buf = xmalloc (strlen (msg) + 128);
sprintf (buf, msg, phys_addr);
- res = (*info->callbacks->warning) (info, buf, name, input_bfd,
- input_section, insn_addr);
+ (*info->callbacks->warning) (info, buf, name, input_bfd,
+ input_section, insn_addr);
free (buf);
- if (! res)
- return FALSE;
break;
}
}
@@ -1262,17 +1252,14 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, NULL, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, NULL, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section,
- rel->r_offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -1292,10 +1279,8 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
break;
}
}
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index fa52bc9..4681556 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -4185,13 +4185,9 @@ elf_m68k_relocate_section (bfd *output_bfd,
}
if (r == bfd_reloc_overflow)
- {
- if (!(info->callbacks->reloc_overflow
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset)))
- return FALSE;
- }
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
else
{
(*_bfd_error_handler)
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index c676e8f..0d18206 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -508,13 +508,13 @@ mep_elf_relocate_section
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -536,11 +536,8 @@ mep_elf_relocate_section
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index a98618a..84f7f11 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -1988,15 +1988,14 @@ elf_metag_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (hh ? &hh->eh.root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, name, input_bfd, input_section, rel->r_offset,
- TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -2017,11 +2016,8 @@ elf_metag_relocate_section (bfd *output_bfd,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index e28ff0b..5496d16 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -1556,16 +1556,14 @@ microblaze_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section, offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -1584,9 +1582,8 @@ microblaze_elf_relocate_section (bfd *output_bfd,
errmsg = _("internal error: unknown error");
/* Fall through. */
common_error:
- if (!((*info->callbacks->warning)
- (info, errmsg, name, input_bfd, input_section, offset)))
- return FALSE;
+ (*info->callbacks->warning) (info, errmsg, name, input_bfd,
+ input_section, offset);
break;
}
}
diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c
index 44ea3b5..10a7a22 100644
--- a/bfd/elf32-moxie.c
+++ b/bfd/elf32-moxie.c
@@ -270,15 +270,14 @@ moxie_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, name, input_bfd, input_section, rel->r_offset,
- TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -299,11 +298,8 @@ moxie_elf_relocate_section (bfd *output_bfd,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 56f0cf1..94052fa 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -1341,15 +1341,14 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section,
- rel->r_offset);
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
- (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -1370,11 +1369,8 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (!r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index 37f37a0..f3e7a5b 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -385,13 +385,13 @@ mt_elf_relocate_section
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -409,11 +409,8 @@ mt_elf_relocate_section
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (! r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index 4f3522a..09d26ae 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -5424,16 +5424,14 @@ check_reloc:
switch (r)
{
case bfd_reloc_overflow:
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, offset)))
- return FALSE;
+ (*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, offset);
break;
case bfd_reloc_undefined:
- if (!((*info->callbacks->undefined_symbol)
- (info, name, input_bfd, input_section, offset, TRUE)))
- return FALSE;
+ (*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -5452,10 +5450,9 @@ check_reloc:
errmsg = _("internal error: unknown error");
/* Fall through. */
-common_error:
- if (!((*info->callbacks->warning)
- (info, errmsg, name, input_bfd, input_section, offset)))
- return FALSE;
+ common_error:
+ (*info->callbacks->warning) (info, errmsg, name, input_bfd,
+ input_section, offset);
break;
}
}
@@ -13059,25 +13056,22 @@ nds32_elf_get_relocated_section_contents (bfd *abfd,
switch (r)
{
case bfd_reloc_undefined:
- if (!((*link_info->callbacks->undefined_symbol)
- (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- input_bfd, input_section, (*parent)->address, TRUE)))
- goto error_return;
+ (*link_info->callbacks->undefined_symbol)
+ (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+ input_bfd, input_section, (*parent)->address, TRUE);
break;
case bfd_reloc_dangerous:
BFD_ASSERT (error_message != NULL);
- if (!((*link_info->callbacks->reloc_dangerous)
- (link_info, error_message, input_bfd, input_section,
- (*parent)->address)))
- goto error_return;
+ (*link_info->callbacks->reloc_dangerous)
+ (link_info, error_message,
+ input_bfd, input_section, (*parent)->address);
break;
case bfd_reloc_overflow:
- if (!((*link_info->callbacks->reloc_overflow)
- (link_info, NULL,
- bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
- (*parent)->howto->name, (*parent)->addend,
- input_bfd, input_section, (*parent)->address)))
- goto error_return;
+ (*link_info->callbacks->reloc_overflow)
+ (link_info, NULL,
+ bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+ (*parent)->howto->name, (*parent)->addend,
+ input_bfd, input_section, (*parent)->address);
break;
case bfd_reloc_outofrange:
/* PR ld/13730:
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index bf8f4ce..d85fc69 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -4480,16 +4480,16 @@ nios2_elf32_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow (info, NULL, name,
- howto->name, (bfd_vma) 0,
- input_bfd, input_section,
- rel->r_offset);
+ (*info->callbacks->reloc_overflow) (info, NULL, name,
+ howto->name, (bfd_vma) 0,
+ input_bfd, input_section,
+ rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol (info, name, input_bfd,
- input_section,
- rel->r_offset, TRUE);
+ (*info->callbacks->undefined_symbol) (info, name, input_bfd,
+ input_section,
+ rel->r_offset, TRUE);
break;
case bfd_reloc_outofrange:
@@ -4515,8 +4515,8 @@ nios2_elf32_relocate_section (bfd *output_bfd,
if (msg)
{
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
return FALSE;
}
}
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index d7963b4..0035f8e 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -1249,13 +1249,13 @@ or1k_elf_relocate_section (bfd *output_bfd,
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
@@ -1277,11 +1277,8 @@ or1k_elf_relocate_section (bfd *output_bfd,
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (!r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 856bef1..accb85f 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -8567,13 +8567,12 @@ ppc_elf_relocate_section (bfd *output_bfd,
at a symbol not in this object. */
if (unresolved_reloc)
{
- if (! (*info->callbacks->undefined_symbol) (info,
- h->root.root.string,
- input_bfd,
- input_section,
- rel->r_offset,
- TRUE))
- return FALSE;
+ (*info->callbacks->undefined_symbol) (info,
+ h->root.root.string,
+ input_bfd,
+ input_section,
+ rel->r_offset,
+ TRUE);
goto copy_reloc;
}
break;
@@ -9509,13 +9508,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& (h->root.type == bfd_link_hash_undefweak
|| h->root.type == bfd_link_hash_undefined)
&& is_branch_reloc (r_type)))
- {
- if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->root : NULL), sym_name,
- howto->name, rel->r_addend,
- input_bfd, input_section, rel->r_offset)))
- return FALSE;
- }
+ info->callbacks->reloc_overflow
+ (info, (h ? &h->root : NULL), sym_name, howto->name,
+ rel->r_addend, input_bfd, input_section, rel->r_offset);
}
else
{
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index b6e0eb8..70011f9 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -295,7 +295,6 @@ rl78_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
static bfd_vma
get_symbol_value (const char * name,
- bfd_reloc_status_type * status,
struct bfd_link_info * info,
bfd * input_bfd,
asection * input_section,
@@ -312,12 +311,8 @@ get_symbol_value (const char * name,
|| (h->type != bfd_link_hash_defined
&& h->type != bfd_link_hash_defweak))
{
- bfd_reloc_status_type res;
-
- res = info->callbacks[...]
[diff truncated at 100000 bytes]