Return void from linker callbacks
authorAlan Modra <amodra@gmail.com>
Fri, 27 May 2016 07:50:55 +0000 (17:20 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 28 May 2016 01:47:20 +0000 (11:17 +0930)
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.

102 files changed:
bfd/ChangeLog
bfd/aoutx.h
bfd/bout.c
bfd/coff-alpha.c
bfd/coff-arm.c
bfd/coff-h8300.c
bfd/coff-h8500.c
bfd/coff-i960.c
bfd/coff-mcore.c
bfd/coff-mips.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff-tic80.c
bfd/coff-w65.c
bfd/coff-z80.c
bfd/coff-z8k.c
bfd/coff64-rs6000.c
bfd/cofflink.c
bfd/ecoff.c
bfd/elf-bfd.h
bfd/elf-m10200.c
bfd/elf-m10300.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-bfin.c
bfd/elf32-cr16.c
bfd/elf32-cr16c.c
bfd/elf32-cris.c
bfd/elf32-crx.c
bfd/elf32-d10v.c
bfd/elf32-epiphany.c
bfd/elf32-fr30.c
bfd/elf32-frv.c
bfd/elf32-ft32.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-i860.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68k.c
bfd/elf32-mep.c
bfd/elf32-metag.c
bfd/elf32-microblaze.c
bfd/elf32-moxie.c
bfd/elf32-msp430.c
bfd/elf32-mt.c
bfd/elf32-nds32.c
bfd/elf32-nios2.c
bfd/elf32-or1k.c
bfd/elf32-ppc.c
bfd/elf32-rl78.c
bfd/elf32-rx.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-sh64.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-visium.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c
bfd/linker.c
bfd/pdp11.c
bfd/pe-mips.c
bfd/reloc.c
bfd/reloc16.c
bfd/simple.c
bfd/vms-alpha.c
bfd/xcofflink.c
gdb/ChangeLog
gdb/compile/compile-object-load.c
include/ChangeLog
include/bfdlink.h
ld/ChangeLog
ld/emultempl/elf32.em
ld/ldmain.c

index cefe44a94a1e0798e929222e63b3866f261dedf2..4ce81a664d3b163bce0311a34e38ff25cebc197b 100644 (file)
@@ -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>
index 61ac9b3e69ffc44d45b8805182b984ead6776077..75ba68b3ea88fe7932d7e5b23901b6fc437c4717 100644 (file)
@@ -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;
                }
index 0718d3e786765c4830da4b2431357918e80624a4..99749f1eaeaa491ae8840da33fc147f1b8bd3632 100644 (file)
@@ -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;
        }
     }
index 55fd35070be4d9fa5a8e83c92e6492cd2791326a..16edc5f20c359ecb2e8283f561e0ec8d822e194a 100644 (file)
@@ -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);
index 1b2c23918ea44effd1c5f691001ae4cb632c127f..34ae35ce48056e486c6b23728f6bd0a3a49ce98f 100644 (file)
@@ -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);
          }
        }
     }
index 66de2be7f23804581186b885feb4795b8ea3b072..c258306b0bc286b91aa202f7f9e642204fe0eecf 100644 (file)
@@ -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;
          }
 
index 8a72af6928491e0c575cbc37489d86d3370c5f42..1b1463411ab4fd6aaf71785f548eb8dd37354427 100644 (file)
@@ -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;
index 96704c68e116db49e15a034e8cd60f275f43a8ff..b2c1512c272964064cc2912b9449313a6fa2b579 100644 (file)
@@ -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);
          }
        }
     }
index a99d4fd6cefd7fad29b0f5e8578216f6a74cafad..002c908a0b5674cd7c6853e54b871dbeaeb886d8 100644 (file)
@@ -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);
        }
     }
 
index 9f730a4c3ef1ebc272197aa8294b9b14ce559b00..dbdf08ca406ae9807938ee0fcf9d33311bbd2434 100644 (file)
@@ -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;
            }
index 784e6f0d97ef511fdd4fdb89cf81308774e82967..a931f6a876bc76d67482983a47ac6920630fd352 100644 (file)
@@ -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);
          }
        }
     }
index ffef1baee93e0172be87fd0b9bbc8f76f1a5ba77..84860db39ee9c815c20c57c9cdd768be9a7ace78 100644 (file)
@@ -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.  */
index 3e0cb7f1b69d72e5dad5eb46e1a3e025142e4c5e..cf37ad22f2ab1f240281bd0e0add3fb11f84bc2a 100644 (file)
@@ -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);
          }
        }
     }
index 49647bd7f19aad89967870fe29234eb1f1e5abab..99808f160497a13d9557eace8c89c4d15444e909 100644 (file)
@@ -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);
          }
        }
     }
index b0d973ae05d46ac528c3b2054f0ba8920327e0c3..e73672a6ccb18c44d4daa21da6e5f13560ddc462 100644 (file)
@@ -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);
index 13fd6aa8c38b428b917b4521e99c1368ae74098b..2cab1171e45d375fbf3c499dbec2b8842f5de5ed 100644 (file)
@@ -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)++;
index 676fee74219ba60b6a8832fe77400f059e521618..5f7f952e23f93055ee14862260eafcd57d63b7d0 100644 (file)
@@ -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;
index 7b5bb2460f729307aecfd0f73a30b78039a8f7db..f2a3c16b6ac1f4f7967440ee9d96fe9db93c63cb 100644 (file)
@@ -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.  */
index b8a85b0c4317f72dcbb9264caac51c9004c71c0c..bcdf778ac0a6afdf57f73dc125fe63d0b3a2e6c4 100644 (file)
@@ -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);
          }
        }
     }
index d618572eaf7e4d6ccb80f86356e85a66b35a042b..4515172983df19c86be9e5ded3b15939b69f2105 100644 (file)
@@ -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;
index fc552ad4fa73c82cf4bc66ed1cad47fb334745cd..3184e573224060a45b04d39bca6b16275dce6dd5 100644 (file)
@@ -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;                                         \
index 871f676d0b0ea6f248789af55e934aacacc7de60..c2e8b98db81fb2fd1540f389b3e35f6e486ad9c0 100644 (file)
@@ -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;
            }
        }
index c1936eb0c290e44c959ca1a960b04b1cedcd39c7..4b1ca580cec208c7eea5fe84ff498eacc4970eeb 100644 (file)
@@ -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:
index 1e012e29a0cb93463b8bf7042d12830b52e79f72..08949c7f5c630a65b677c0ad4dedbcb0e3c81865 100644 (file)
@@ -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)
index 6375ae4374b0e92228e3d0e9c04ce534e1b47e01..20a198912427748d5a3c793057f8975927b54b36 100644 (file)
@@ -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;
            }
        }
index 764d0d1ffbc534dd063742bbeb9959805cf0c061..d463d78c86109f6c4f92da0dfa9b2d72e4881ca7 100644 (file)
@@ -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);
        }
     }
 
index b2fcf38b470e75ae0597cdd11f7b7c9cf7992de3..d7d096af1c8146690434abac0a80a3c5b3eea1a2 100644 (file)
@@ -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);
        }
     }
 
index 20015a4e3e0ffcb6a4628225c679459eed258488..940802418962341f8b976c0178782a78759cb5bd 100644 (file)
@@ -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;
             }
         }
index ef981360e7594c6d1e87fc11b39855c6abd5fed6..d3f56f18b12a179cec2ec8b5cde05ec48a5adda2 100644 (file)
@@ -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;
            }
        }
index 4aa1d45f8c5e8d4400a86c8224de23433bd05803..e759745d43b5d75087ebb282a97e8093bc64a203 100644 (file)
@@ -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);
        }
     }
 
index 65b9355e3c073620337130ee63fda899d92a44da..cc8bedf6aab522ba6d6fd6886c2b8e49e04b684a 100644 (file)
@@ -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;
            }
        }
index f0629b74a6c25d9265543b42e4f214ce075ad8b4..f6d4b0e485476bff7a396fde4691fc4606d151bb 100644 (file)
@@ -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;
            }
        }
index 25ed0fe272cd7a587f9bfe52e79349cd750429c9..420dc8bb0780d5a62e236e374859c2dffe879494 100644 (file)
@@ -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);
        }
     }
 
index 0ae09f1a00da8b7a10e45310efebcd2810b1f30a..7dd4ca4880a5c5fb0d9707fcd1dd2a321b1cae6c 100644 (file)
@@ -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);
        }
     }
 
index e0e3806c42dc011591445dc88c4af886acfd9b14..5990faaeb93ad96327b32e4da7a73acbb2be0d2e 100644 (file)
@@ -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;
        }
     }
 
index 47f80c38622866b11e23ecda23c2b376e70b5a6d..9c5f7345af584860cc115c26eb0b47bddcf93728 100644 (file)
@@ -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);
        }
     }
 
index 9996cb376e5dffaca1eb321b9596f0b5199bfc27..5368385fd90724ce1cf9ef52607240061fff05f2 100644 (file)
@@ -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;
            }
        }
index d67a40eb9cc022b954360542cf3006032d0c181c..be10c9b4a848eecea886948f912e7f3a9c8c60a8 100644 (file)
@@ -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;
index 9fd7219459c5e882687c4fec7b4980b316011ced..4f6d727cec5a9d598b4f3c226988625512928ee7 100644 (file)
@@ -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;
            }
        }
 
index 8766d2b7b10c642e080b8608094545886d32e29a..d46ece7e7a7c24738f0080cc571833564f8574e5 100644 (file)
@@ -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)
index 371bf94826348d8773286114c11e00054f339c6b..089d8318391160d601dfead93c70306322873f72 100644 (file)
@@ -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);
        }
     }
 
index 97cb633dedd94aa958c57ae38a5246c4708e38ae..820e1461fcb6dba02cd4009fbc2afd2fefd1ba3f 100644 (file)
@@ -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);
        }
     }
 
index 642c92974a2af124702f44d927069f71339b22d4..0f7a75d00ae990093d94deec3efe6a76da608069 100644 (file)
@@ -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);
        }
     }
 
index bdeefcf71cd8595c4d1ec68706d4d0bc2d25d0d9..0c79397abd85c75911caf67f0490a2d0fa6f93fd 100644 (file)
@@ -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;
             }
         }
index 8436fb10fb4f805d5130e3f611cfb1c1ed4b2f03..635d6648cf62794e9c5da651c56e94391daec728 100644 (file)
@@ -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);
        }
     }
 
index 22f3b1e5a90ee8e3e34546e86bf2cdf99c4c33b0..7034c3d3fd3ddffed0dcdd4af9c19f37e3210883 100644 (file)
@@ -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;
            }
        }
index 912efdf65d8b50783a6741d3c932ed4764b6f431..4824fde37623d9aa3703aa923f2c0716531f4523 100644 (file)
@@ -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;
            }
        }
index fa52bc9de7426763c594941300517f8638300a77..46815560a995246bce43874c7e761e7ed55d37c0 100644 (file)
@@ -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)
index c676e8f8df30455f9d72d0f9b7dcd4f21416698f..0d18206b144ecb4e6d8fa766d5de8232578ac1de 100644 (file)
@@ -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);
        }
     }
 
index a98618ad34c490be19e61253a17edbc66edc0049..84f7f112a6bddc7f9168780c9d87a0894388db26 100644 (file)
@@ -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);
        }
     }
 
index e28ff0b32af0741316a92f0c6c7996c03684ef90..5496d1613aa0d00416511f9929a94bd6b4d267de 100644 (file)
@@ -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;
            }
        }
index 44ea3b5e1f7076f7ae397bef851470e9ba77fce8..10a7a22ad040ce86392328b1b4038314f055cf54 100644 (file)
@@ -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);
        }
     }
 
index 56f0cf1135e20142f334959b386d2b76c13ec4af..94052fa0916a712b42ed060fa74fa4f48d014378 100644 (file)
@@ -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);
        }
 
     }
index 37f37a01139f2875a1af598b80e5f1040e53a79b..f3e7a5bf6a812d23c1bf34e4afc6ad6b11eb0c21 100644 (file)
@@ -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);
        }
     }
 
index 4f3522abf56fa8a7092d5a00991d73007a83b2fa..09d26aed10b30475bc06ec6d10611e10aefb5469 100644 (file)
@@ -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:
index bf8f4ce2c520c825e048a199c7593b7173f7ea0b..d85fc69eb79922a9043a8847c139706de93c4cb6 100644 (file)
@@ -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;
            }
        }
index d7963b457d70cc68d645870ab8978c78c8aec1d3..0035f8e7dfe6d82de7111dfdf626b2c6970f359d 100644 (file)
@@ -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);
         }
     }
 
index 856bef1b1b1813affaf77648ce7b1b438e2f5275..accb85f71e38d6fa94177c048b5a3c0b9649c9fa 100644 (file)
@@ -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
            {
index b6e0eb8f92332bc2a86004547349dd9120bad13e..70011f94d12193efac58c40c6360a9ef33019118 100644 (file)
@@ -295,7 +295,6 @@ rl78_info_to_howto_rela (bfd *               abfd ATTRIBUTE_UNUSED,
 \f
 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->undefined_symbol
+      (*info->callbacks->undefined_symbol)
        (info, name, input_bfd, input_section, offset, TRUE);
-      if (status)
-       * status = res;
       return 0;
     }
 
@@ -327,44 +322,36 @@ get_symbol_value (const char *            name,
 }
 
 static bfd_vma
-get_romstart (bfd_reloc_status_type * status,
-             struct bfd_link_info *  info,
+get_romstart (struct bfd_link_info *  info,
              bfd *                   abfd,
              asection *              sec,
              int                     offset)
 {
   static bfd_boolean cached = FALSE;
   static bfd_vma     cached_value = 0;
-  static bfd_reloc_status_type cached_status;
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("_start", & cached_status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("_start", info, abfd, sec, offset);
       cached = TRUE;
     }
-  if (status)
-    * status = cached_status;
   return cached_value;
 }
 
 static bfd_vma
-get_ramstart (bfd_reloc_status_type * status,
-             struct bfd_link_info *  info,
+get_ramstart (struct bfd_link_info *  info,
              bfd *                   abfd,
              asection *              sec,
              int                     offset)
 {
   static bfd_boolean cached = FALSE;
   static bfd_vma     cached_value = 0;
-  static bfd_reloc_status_type cached_status;
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("__datastart", & cached_status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("__datastart", info, abfd, sec, offset);
       cached = TRUE;
     }
-  if (status)
-    * status = cached_status;
   return cached_value;
 }
 
@@ -573,12 +560,12 @@ rl78_special_reloc (bfd *      input_bfd,
        break;
 
     case R_RL78_OPromtop:
-      relocation = get_romstart (&r, NULL, input_bfd, input_section,
+      relocation = get_romstart (NULL, input_bfd, input_section,
                                 reloc->address);
       break;
 
     case R_RL78_OPramtop:
-      relocation = get_ramstart (&r, NULL, input_bfd, input_section,
+      relocation = get_ramstart (NULL, input_bfd, input_section,
                                 reloc->address);
       break;
     }
@@ -1068,12 +1055,12 @@ rl78_elf_relocate_section
          break;
 
        case R_RL78_OPromtop:
-         relocation = get_romstart (&r, info, input_bfd, input_section, rel->r_offset);
+         relocation = get_romstart (info, input_bfd, input_section, rel->r_offset);
          (void) rl78_compute_complex_reloc (r_type, relocation, input_section);
          break;
 
        case R_RL78_OPramtop:
-         relocation = get_ramstart (&r, info, input_bfd, input_section, rel->r_offset);
+         relocation = get_ramstart (info, input_bfd, input_section, rel->r_offset);
          (void) rl78_compute_complex_reloc (r_type, relocation, input_section);
          break;
 
@@ -1094,15 +1081,14 @@ rl78_elf_relocate_section
              if (r_type == R_RL78_DIR24S_PCREL)
                msg = _("%B(%A): error: call to undefined function '%s'");
              else
-               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_other:
@@ -1128,9 +1114,6 @@ rl78_elf_relocate_section
 
          if (msg)
            _bfd_error_handler (msg, input_bfd, input_section, name);
-
-         if (! r)
-           return FALSE;
        }
     }
 
@@ -1932,12 +1915,12 @@ rl78_offset_for_reloc (bfd *                    abfd,
          break;
 
        case R_RL78_OPromtop:
-         symval = get_romstart (NULL, info, input_bfd, input_section, rel->r_offset);
+         symval = get_romstart (info, input_bfd, input_section, rel->r_offset);
          (void) rl78_compute_complex_reloc (r_type, symval, input_section);
          break;
 
        case R_RL78_OPramtop:
-         symval = get_ramstart (NULL, info, input_bfd, input_section, rel->r_offset);
+         symval = get_ramstart (info, input_bfd, input_section, rel->r_offset);
          (void) rl78_compute_complex_reloc (r_type, symval, input_section);
          break;
 
index 147a1a39e4724e321db9cbdaec8a55c81a679ba3..49556d2831ec79c709cebde23a9cf7370a62e4f6 100644 (file)
@@ -317,7 +317,6 @@ rx_info_to_howto_rela (bfd *               abfd ATTRIBUTE_UNUSED,
 \f
 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,
@@ -331,7 +330,7 @@ get_symbol_value (const char *            name,
   if (h == NULL
       || (h->type != bfd_link_hash_defined
          && h->type != bfd_link_hash_defweak))
-    * status = info->callbacks->undefined_symbol
+    (*info->callbacks->undefined_symbol)
       (info, name, input_bfd, input_section, offset, TRUE);
   else
     value = (h->u.def.value
@@ -340,6 +339,7 @@ get_symbol_value (const char *            name,
 
   return value;
 }
+
 static bfd_vma
 get_symbol_value_maybe (const char *            name,
                        struct bfd_link_info *  info)
@@ -362,8 +362,7 @@ get_symbol_value_maybe (const char *            name,
 }
 
 static bfd_vma
-get_gp (bfd_reloc_status_type * status,
-       struct bfd_link_info *  info,
+get_gp (struct bfd_link_info *  info,
        bfd *                   abfd,
        asection *              sec,
        int                     offset)
@@ -373,15 +372,14 @@ get_gp (bfd_reloc_status_type * status,
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("__gp", status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("__gp", info, abfd, sec, offset);
       cached = TRUE;
     }
   return cached_value;
 }
 
 static bfd_vma
-get_romstart (bfd_reloc_status_type * status,
-             struct bfd_link_info *  info,
+get_romstart (struct bfd_link_info *  info,
              bfd *                   abfd,
              asection *              sec,
              int                     offset)
@@ -391,15 +389,14 @@ get_romstart (bfd_reloc_status_type * status,
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("_start", status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("_start", info, abfd, sec, offset);
       cached = TRUE;
     }
   return cached_value;
 }
 
 static bfd_vma
-get_ramstart (bfd_reloc_status_type * status,
-             struct bfd_link_info *  info,
+get_ramstart (struct bfd_link_info *  info,
              bfd *                   abfd,
              asection *              sec,
              int                     offset)
@@ -409,7 +406,7 @@ get_ramstart (bfd_reloc_status_type * status,
 
   if (!cached)
     {
-      cached_value = get_symbol_value ("__datastart", status, info, abfd, sec, offset);
+      cached_value = get_symbol_value ("__datastart", info, abfd, sec, offset);
       cached = TRUE;
     }
   return cached_value;
@@ -553,7 +550,6 @@ rx_elf_relocate_section
          bfd_vma entry_vma;
          int idx;
          char *buf;
-         bfd_reloc_status_type tstat = 0;
 
          if (table_default_cache != name)
            {
@@ -571,18 +567,14 @@ rx_elf_relocate_section
              buf = (char *) malloc (13 + strlen (name + 20));
 
              sprintf (buf, "$tablestart$%s", name + 20);
-             tstat = 0;
              table_start_cache = get_symbol_value (buf,
-                                                   &tstat,
                                                    info,
                                                    input_bfd,
                                                    input_section,
                                                    rel->r_offset);
 
              sprintf (buf, "$tableend$%s", name + 20);
-             tstat = 0;
              table_end_cache = get_symbol_value (buf,
-                                                 &tstat,
                                                  info,
                                                  input_bfd,
                                                  input_section,
@@ -956,7 +948,7 @@ rx_elf_relocate_section
 
        case R_RX_RH_GPRELB:
          WARN_REDHAT ("RX_RH_GPRELB");
-         relocation -= get_gp (&r, info, input_bfd, input_section, rel->r_offset);
+         relocation -= get_gp (info, input_bfd, input_section, rel->r_offset);
          RANGE (0, 65535);
 #if RX_OPCODE_BIG_ENDIAN
          OP (1) = relocation;
@@ -969,7 +961,7 @@ rx_elf_relocate_section
 
        case R_RX_RH_GPRELW:
          WARN_REDHAT ("RX_RH_GPRELW");
-         relocation -= get_gp (&r, info, input_bfd, input_section, rel->r_offset);
+         relocation -= get_gp (info, input_bfd, input_section, rel->r_offset);
          ALIGN (1);
          relocation >>= 1;
          RANGE (0, 65535);
@@ -984,7 +976,7 @@ rx_elf_relocate_section
 
        case R_RX_RH_GPRELL:
          WARN_REDHAT ("RX_RH_GPRELL");
-         relocation -= get_gp (&r, info, input_bfd, input_section, rel->r_offset);
+         relocation -= get_gp (info, input_bfd, input_section, rel->r_offset);
          ALIGN (3);
          relocation >>= 2;
          RANGE (0, 65535);
@@ -1407,11 +1399,11 @@ rx_elf_relocate_section
          break;
 
        case R_RX_OPromtop:
-         RX_STACK_PUSH (get_romstart (&r, info, input_bfd, input_section, rel->r_offset));
+         RX_STACK_PUSH (get_romstart (info, input_bfd, input_section, rel->r_offset));
          break;
 
        case R_RX_OPramtop:
-         RX_STACK_PUSH (get_ramstart (&r, info, input_bfd, input_section, rel->r_offset));
+         RX_STACK_PUSH (get_ramstart (info, input_bfd, input_section, rel->r_offset));
          break;
 
        default:
@@ -1431,15 +1423,14 @@ rx_elf_relocate_section
              if (r_type == R_RX_DIR24S_PCREL)
                msg = _("%B(%A): error: call to undefined function '%s'");
              else
-               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_other:
@@ -1465,9 +1456,6 @@ rx_elf_relocate_section
 
          if (msg)
            _bfd_error_handler (msg, input_bfd, input_section, name);
-
-         if (! r)
-           return FALSE;
        }
     }
 
@@ -1902,11 +1890,11 @@ rx_offset_for_reloc (bfd *                    abfd,
          break;
 
        case R_RX_OPromtop:
-         RX_STACK_PUSH (get_romstart (&r, info, input_bfd, input_section, rel->r_offset));
+         RX_STACK_PUSH (get_romstart (info, input_bfd, input_section, rel->r_offset));
          break;
 
        case R_RX_OPramtop:
-         RX_STACK_PUSH (get_ramstart (&r, info, input_bfd, input_section, rel->r_offset));
+         RX_STACK_PUSH (get_ramstart (info, input_bfd, input_section, rel->r_offset));
          break;
 
        case R_RX_DIR16UL:
@@ -1941,6 +1929,8 @@ rx_offset_for_reloc (bfd *                    abfd,
 
       rel ++;
     }
+  /* FIXME.  */
+  (void) r;
 }
 
 static void
index 88a3c9600a75f6b8bcb9508cecfe400e010d648a..f3ee40c0f7b60bd807af6a6bd12b6f0080e1c9a8 100644 (file)
@@ -3442,14 +3442,9 @@ elf_s390_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)
index ab564a97d23abe497d6a5bddf3745d3bbd9ec42c..2e9dd9a2e8fdb1e16d4793c1aadd8cffd94002a6 100644 (file)
@@ -2667,12 +2667,11 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd,
             }
           else if (!bfd_link_relocatable (info))
             {
-              if (! ((*info->callbacks->undefined_symbol)
-                     (info, h->root.root.root.string, input_bfd,
-                      input_section, rel->r_offset,
-                      (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-                      || ELF_ST_VISIBILITY (h->root.other))))
-                return bfd_reloc_undefined;
+             (*info->callbacks->undefined_symbol)
+               (info, h->root.root.root.string, input_bfd,
+                input_section, rel->r_offset,
+                (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+                || ELF_ST_VISIBILITY (h->root.other));
               relocation = 0;
             }
         }
@@ -2718,16 +2717,14 @@ s3_bfd_score_elf_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.root.type != bfd_link_hash_undefined))
-                  && (!((*info->callbacks->reloc_overflow)
-                        (info, NULL, name, howto->name, (bfd_vma) 0,
-                         input_bfd, input_section, rel->r_offset))))
-                return FALSE;
+             if (!h || h->root.root.type != bfd_link_hash_undefined)
+               (*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:
@@ -2752,9 +2749,8 @@ s3_bfd_score_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;
             }
         }
index 04e2d709b62359cec3339b5f59a50e6f32136fc5..d69cfdf956d10b2db75c7f1c5d540b0e37b1f685 100644 (file)
@@ -2440,12 +2440,11 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
             }
           else if (!bfd_link_relocatable (info))
             {
-              if (! ((*info->callbacks->undefined_symbol)
-                     (info, h->root.root.root.string, input_bfd,
-                      input_section, rel->r_offset,
-                      (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-                      || ELF_ST_VISIBILITY (h->root.other))))
-                return bfd_reloc_undefined;
+             (*info->callbacks->undefined_symbol)
+               (info, h->root.root.root.string, input_bfd,
+                input_section, rel->r_offset,
+                (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+                || ELF_ST_VISIBILITY (h->root.other));
               relocation = 0;
             }
         }
@@ -2528,16 +2527,14 @@ s7_bfd_score_elf_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.root.type != bfd_link_hash_undefined))
-                  && (!((*info->callbacks->reloc_overflow)
-                        (info, NULL, name, howto->name, (bfd_vma) 0,
-                         input_bfd, input_section, rel->r_offset))))
-                return FALSE;
+              if (!h || h->root.root.type != bfd_link_hash_undefined)
+               (*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:
@@ -2557,9 +2554,8 @@ s7_bfd_score_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;
             }
         }
index b99311351be38f282f687693c336ec1d931df8e5..52a5fd1bd3156587d2009eca0c7d18316a6f5871 100644 (file)
@@ -3952,10 +3952,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
             datalabel processing here.  Make sure this does not change
             without notice.  */
          if ((sym->st_other & STO_SH5_ISA32) != 0)
-           ((*info->callbacks->reloc_dangerous)
-            (info,
-             _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
-             input_bfd, input_section, rel->r_offset));
+           (*info->callbacks->reloc_dangerous)
+             (info,
+              _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
+              input_bfd, input_section, rel->r_offset);
 
          if (sec != NULL && discarded_section (sec))
            /* Handled below.  */
@@ -4141,14 +4141,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                   && 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, rel->r_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, rel->r_offset,
+              (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+               || ELF_ST_VISIBILITY (h->other)));
        }
 
       if (sec != NULL && discarded_section (sec))
@@ -5520,11 +5517,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                    if (*name == '\0')
                      name = bfd_section_name (input_bfd, sec);
                  }
-               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;
            }
index ba11416d65b98d766f165030af5341d4d8980c7a..4e88de936d6611119a516d44322a000db8a929f9 100644 (file)
@@ -530,11 +530,9 @@ shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
                     && ((*relocation + rel->r_addend) & 1) == 0)
              msg = _("PTA mismatch: a SHcompact address (bit 0 == 0)");
 
-           if (msg != NULL
-               && ! ((*info->callbacks->reloc_dangerous)
-                     (info, msg, abfd, input_section,
-                      rel->r_offset)))
-             return FALSE;
+           if (msg != NULL)
+             (*info->callbacks->reloc_dangerous)
+               (info, msg, abfd, input_section, rel->r_offset);
          }
        else
          {
index 0ed3422212997570ab43721e1a0ce605b0980bcd..e304b55147dc2ea1f3af13c7cacb77d044e0d1d3 100644 (file)
@@ -4908,12 +4908,11 @@ spu_elf_relocate_section (bfd *output_bfd,
              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);
            }
          sym_name = h->root.root.string;
        }
@@ -5050,17 +5049,14 @@ spu_elf_relocate_section (bfd *output_bfd,
          switch (r)
            {
            case bfd_reloc_overflow:
-             if (!((*info->callbacks->reloc_overflow)
-                   (info, (h ? &h->root : NULL), sym_name, howto->name,
-                    (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
-               return FALSE;
+             (*info->callbacks->reloc_overflow)
+               (info, (h ? &h->root : NULL), sym_name, howto->name,
+                (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
              break;
 
            case bfd_reloc_undefined:
-             if (!((*info->callbacks->undefined_symbol)
-                   (info, sym_name, input_bfd, input_section,
-                    rel->r_offset, TRUE)))
-               return FALSE;
+             (*info->callbacks->undefined_symbol)
+               (info, sym_name, input_bfd, input_section, rel->r_offset, TRUE);
              break;
 
            case bfd_reloc_outofrange:
@@ -5081,10 +5077,8 @@ spu_elf_relocate_section (bfd *output_bfd,
 
            common_error:
              ret = FALSE;
-             if (!((*info->callbacks->warning)
-                   (info, msg, sym_name, input_bfd, input_section,
-                    rel->r_offset)))
-               return FALSE;
+             (*info->callbacks->warning) (info, msg, sym_name, input_bfd,
+                                          input_section, rel->r_offset);
              break;
            }
        }
index 0ca1e7ad518092a4c031ca23dcaa5d0d44643b78..87c8bfe2c65df20a473c7929ac12c5c146fc43f3 100644 (file)
@@ -2719,20 +2719,16 @@ elf32_tic6x_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:
@@ -2753,10 +2749,8 @@ elf32_tic6x_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;
            }
        }
index 0439800c4adfe2f4a15ff45f51c820586175db06..dfb93ff55c46269f0ff59259c5709b177c3dc9d7 100644 (file)
@@ -3657,15 +3657,14 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          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:
@@ -3686,11 +3685,8 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            }
 
          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);
        }
     }
 
index 8f73d3283013731955d8bdca4c5afb2ab0f24640..f80b18753d5b0ce76b6341c6b6664f7da03891ce 100644 (file)
@@ -2271,18 +2271,14 @@ v850_elf_relocate_section (bfd *output_bfd,
          switch ((int) 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:
@@ -2314,10 +2310,8 @@ v850_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;
            }
        }
index 355bdd99b565f366162fafc2915b0b8cd440290d..41c52f11257fceb9ee11f07dfa9e2659dda6e374 100644 (file)
@@ -1738,11 +1738,9 @@ elf_vax_relocate_section (bfd *output_bfd,
                    if (*name == '\0')
                      name = bfd_section_name (input_bfd, sec);
                  }
-               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;
            }
index 32ca479103e83f2b10a6e51a5587df5d50ce09f4..db854a068e33c6d56b1ef79b7a7013dc67082394 100644 (file)
@@ -662,13 +662,13 @@ visium_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;
 
@@ -690,11 +690,8 @@ visium_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);
        }
     }
 
index b9309b327fb0581280389417a03f145fccf35bde..cab0f23794dce6938251fb1c2ada053927437325 100644 (file)
@@ -920,15 +920,14 @@ xstormy16_elf_relocate_section (bfd *                   output_bfd ATTRIBUTE_UNU
          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:
@@ -949,11 +948,8 @@ xstormy16_elf_relocate_section (bfd *                   output_bfd ATTRIBUTE_UNU
            }
 
          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);
        }
     }
 
index 3a74c2a8f35e1b2654cc5829d7df2837822c10c1..af9618dbfc23f91b881920d12f775f515b3e6d13 100644 (file)
@@ -2702,12 +2702,10 @@ elf_xtensa_relocate_section (bfd *output_bfd,
              r = contract_asm_expansion (contents, input_size, rel,
                                          &error_message);
              if (r != bfd_reloc_ok)
-               {
-                 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);
+
              r_type = ELF32_R_TYPE (rel->r_info);
            }
 
@@ -2759,12 +2757,9 @@ elf_xtensa_relocate_section (bfd *output_bfd,
                }
            }
          if (r != bfd_reloc_ok)
-           {
-             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);
 
          /* Done with work for relocatable link; continue with next reloc.  */
          continue;
@@ -2864,10 +2859,9 @@ elf_xtensa_relocate_section (bfd *output_bfd,
                    {
                      error_message =
                        _("dynamic relocation in read-only section");
-                     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);
                    }
 
                  if (dynamic_symbol)
@@ -2961,10 +2955,9 @@ elf_xtensa_relocate_section (bfd *output_bfd,
              {
                error_message =
                  _("TLS relocation invalid without dynamic sections");
-               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);
              }
            else
              {
@@ -2985,10 +2978,9 @@ elf_xtensa_relocate_section (bfd *output_bfd,
                  {
                    error_message =
                      _("dynamic relocation in read-only section");
-                   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);
                  }
 
                indx = h && h->dynindx != -1 ? h->dynindx : 0;
@@ -3030,12 +3022,9 @@ elf_xtensa_relocate_section (bfd *output_bfd,
                (h && elf_xtensa_hash_entry (h) == htab->tlsbase);
              if (! replace_tls_insn (rel, input_bfd, input_section, contents,
                                      is_ld_model, &error_message))
-               {
-                 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);
 
              if (r_type != R_XTENSA_TLS_ARG || is_ld_model)
                {
@@ -3054,10 +3043,8 @@ elf_xtensa_relocate_section (bfd *output_bfd,
              error_message =
                vsprint_msg ("invalid relocation for dynamic symbol", ": %s",
                             strlen (name) + 2, name);
-             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);
              continue;
            }
          break;
@@ -3105,10 +3092,8 @@ elf_xtensa_relocate_section (bfd *output_bfd,
                                         strlen (name) + 22,
                                         name, (int) rel->r_addend);
 
-         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);
        }
     }
 
index 557b2a154b4fe59d34a314b283e1251328636599..681f792c7131a58aff32bc659664604e2aba080c 100644 (file)
@@ -4825,11 +4825,9 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                if (*name == '\0')
                  name = bfd_section_name (input_bfd, sec);
              }
-           if (! ((*info->callbacks->reloc_overflow)
-                  (info, (h ? &h->root.root : NULL), name, howto->name,
-                   (bfd_vma) 0, input_bfd, input_section,
-                   rel->r_offset)))
-             ret_val = 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;
 
index a7bad705ba0d34f27dee4d58f1c5ee404cddfa56..fca40e185177a030be2ca913b5d9919295939f0c 100644 (file)
@@ -3908,12 +3908,11 @@ elf64_hppa_relocate_section (bfd *output_bfd,
              bfd_boolean err;
              err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
                     || ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT);
-             if (!info->callbacks->undefined_symbol (info,
-                                                     eh->root.root.string,
-                                                     input_bfd,
-                                                     input_section,
-                                                     rel->r_offset, err))
-               return FALSE;
+             (*info->callbacks->undefined_symbol) (info,
+                                                   eh->root.root.string,
+                                                   input_bfd,
+                                                   input_section,
+                                                   rel->r_offset, err);
            }
 
           if (!bfd_link_relocatable (info)
@@ -3925,12 +3924,9 @@ elf64_hppa_relocate_section (bfd *output_bfd,
               if (info->unresolved_syms_in_objects == RM_IGNORE
                   && 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, rel->r_offset, FALSE))
-                    return FALSE;
-                }
+               (*info->callbacks->undefined_symbol)
+                 (info, eh_name (eh), input_bfd,
+                  input_section, rel->r_offset, FALSE);
             }
        }
 
@@ -3969,11 +3965,9 @@ elf64_hppa_relocate_section (bfd *output_bfd,
                      sym_name = bfd_section_name (input_bfd, sym_sec);
                  }
 
-               if (!((*info->callbacks->reloc_overflow)
-                     (info, (eh ? &eh->root : NULL), sym_name,
-                      howto->name, (bfd_vma) 0, input_bfd,
-                      input_section, rel->r_offset)))
-                 return FALSE;
+               (*info->callbacks->reloc_overflow)
+                 (info, (eh ? &eh->root : NULL), sym_name, howto->name,
+                  (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
              }
              break;
            }
index 44826461adea6453781a13ea664a2a1f6814d884..56c110314e693555f5411c2efcc4be8605a533c6 100644 (file)
@@ -3902,10 +3902,9 @@ elf64_ia64_relocate_section (bfd *output_bfd,
            else
              name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
                                       sym_sec);
-           if (!(*info->callbacks->warning) (info, _("unsupported reloc"),
-                                             name, input_bfd,
-                                             input_section, rel->r_offset))
-             return FALSE;
+           (*info->callbacks->warning) (info, _("unsupported reloc"),
+                                        name, input_bfd,
+                                        input_section, rel->r_offset);
            ret_val = FALSE;
          }
          break;
@@ -3960,15 +3959,14 @@ elf64_ia64_relocate_section (bfd *output_bfd,
                    break;
                  }
              default:
-               if (!(*info->callbacks->reloc_overflow) (info,
-                                                        &h->root,
-                                                        name,
-                                                        howto->name,
-                                                        (bfd_vma) 0,
-                                                        input_bfd,
-                                                        input_section,
-                                                        rel->r_offset))
-                 return FALSE;
+               (*info->callbacks->reloc_overflow) (info,
+                                                   &h->root,
+                                                   name,
+                                                   howto->name,
+                                                   (bfd_vma) 0,
+                                                   input_bfd,
+                                                   input_section,
+                                                   rel->r_offset);
                break;
              }
 
index b15ef9f9bb375b346e12debfeca53463e583a521..2038813067041be5f6e0da334710dade234556c8 100644 (file)
@@ -1516,13 +1516,12 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 
       if (r != bfd_reloc_ok)
        {
-         bfd_boolean check_ok = TRUE;
          const char * msg = (const char *) NULL;
 
          switch (r)
            {
            case bfd_reloc_overflow:
-             check_ok = 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;
@@ -1530,9 +1529,8 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            case bfd_reloc_undefined:
              /* We may have sent this message above.  */
              if (! undefined_signalled)
-               check_ok = 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);
              undefined_signalled = TRUE;
              break;
 
@@ -1554,11 +1552,8 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            }
 
          if (msg)
-           check_ok = info->callbacks->warning
-             (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-         if (! check_ok)
-           return FALSE;
+           (*info->callbacks->warning) (info, msg, name, input_bfd,
+                                        input_section, rel->r_offset);
        }
     }
 
index 47acd93554ffcc8bc31cf8305cb51cf6216c1472..41fe87919a9840cf4c218ba2f585cf2d3cafc97f 100644 (file)
@@ -15144,13 +15144,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                           && (h->elf.root.type == bfd_link_hash_undefweak
                               || h->elf.root.type == bfd_link_hash_undefined)
                           && is_branch_reloc (r_type))))
-               {
-                 if (!((*info->callbacks->reloc_overflow)
-                       (info, &h->elf.root, sym_name,
-                        reloc_name, orig_rel.r_addend,
-                        input_bfd, input_section, rel->r_offset)))
-                   return FALSE;
-               }
+               info->callbacks->reloc_overflow (info, &h->elf.root,
+                                                sym_name, reloc_name,
+                                                orig_rel.r_addend,
+                                                input_bfd, input_section,
+                                                rel->r_offset);
            }
          else
            {
index 39509392ffa249a43636adb2d19ef0b181b97e72..b14b479cbf02c20cae0d53cc8a8ef217b1e19c16 100644 (file)
@@ -3357,14 +3357,9 @@ elf_s390_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)
index 8a8804a03009ddc9cb321bedc1a65e44ab612568..d9632191d1646bbe77411fcb58ffaa0770b1bab6 100644 (file)
@@ -1508,10 +1508,10 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
             datalabel processing here.  Make sure this does not change
             without notice.  */
          if ((sym->st_other & STO_SH5_ISA32) != 0)
-           ((*info->callbacks->reloc_dangerous)
-            (info,
-             _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
-             input_bfd, input_section, rel->r_offset));
+           (*info->callbacks->reloc_dangerous)
+             (info,
+              _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
+              input_bfd, input_section, rel->r_offset);
 
          if (sec != NULL && discarded_section (sec))
            /* Handled below.  */
@@ -1650,14 +1650,11 @@ sh_elf64_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, rel->r_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, rel->r_offset,
+              (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+               || ELF_ST_VISIBILITY (h->other)));
        }
 
       if (sec != NULL && discarded_section (sec))
@@ -2081,11 +2078,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                    if (*name == '\0')
                      name = bfd_section_name (input_bfd, sec);
                  }
-               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;
            }
index 170b61a7396d5c382e9fc798ce9a57796b54693d..78609b1e29880b02f431ffccb9e6acfdf9bf101d 100644 (file)
@@ -5372,13 +5372,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)
index b4efd5aec20c99a75719f67f4949fce090357017..93e7dd2e25479f99d097c8ecc53efe0e9b52433d 100644 (file)
@@ -1481,10 +1481,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
         the old symbol override the new one as normally happens with
         symbols defined in dynamic objects.  */
 
-      if (! ((*info->callbacks->multiple_common)
-            (info, &h->root, abfd, bfd_link_hash_common, sym->st_size)))
-       return FALSE;
-
+      (*info->callbacks->multiple_common) (info, &h->root, abfd,
+                                          bfd_link_hash_common, sym->st_size);
       if (sym->st_size > h->size)
        h->size = sym->st_size;
 
@@ -1642,9 +1640,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
       /* It would be best if we could set the hash table entry to a
         common symbol, but we don't know what to use for the section
         or the alignment.  */
-      if (! ((*info->callbacks->multiple_common)
-            (info, &h->root, abfd, bfd_link_hash_common, sym->st_size)))
-       return FALSE;
+      (*info->callbacks->multiple_common) (info, &h->root, abfd,
+                                          bfd_link_hash_common, sym->st_size);
 
       /* If the presumed common symbol in the dynamic object is
         larger, pretend that the new symbol has its size.  */
@@ -9235,19 +9232,11 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
          && (!h->ref_regular || flinfo->info->gc_sections)
          && !elf_link_check_versioned_symbol (flinfo->info, bed, h)
          && flinfo->info->unresolved_syms_in_shared_libs != RM_IGNORE)
-       {
-         if (!(flinfo->info->callbacks->undefined_symbol
-               (flinfo->info, h->root.root.string,
-                h->ref_regular ? NULL : h->root.u.undef.abfd,
-                NULL, 0,
-                (flinfo->info->unresolved_syms_in_shared_libs
-                 == RM_GENERATE_ERROR))))
-           {
-             bfd_set_error (bfd_error_bad_value);
-             eoinfo->failed = TRUE;
-             return FALSE;
-           }
-       }
+       (*flinfo->info->callbacks->undefined_symbol)
+         (flinfo->info, h->root.root.string,
+          h->ref_regular ? NULL : h->root.u.undef.abfd,
+          NULL, 0,
+          flinfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR);
 
       /* Strip a global symbol defined in a discarded section.  */
       if (h->indx == -3)
@@ -10761,9 +10750,8 @@ elf_reloc_link_order (bfd *output_bfd,
        }
       else
        {
-         if (! ((*info->callbacks->unattached_reloc)
-                (info, link_order->u.reloc.p->u.name, NULL, NULL, 0)))
-           return FALSE;
+         (*info->callbacks->unattached_reloc)
+           (info, link_order->u.reloc.p->u.name, NULL, NULL, 0);
          indx = 0;
        }
     }
@@ -10798,13 +10786,9 @@ elf_reloc_link_order (bfd *output_bfd,
                                         link_order->u.reloc.p->u.section);
          else
            sym_name = link_order->u.reloc.p->u.name;
-         if (! ((*info->callbacks->reloc_overflow)
-                (info, NULL, sym_name, howto->name, addend, NULL,
-                 NULL, (bfd_vma) 0)))
-           {
-             free (buf);
-             return FALSE;
-           }
+         (*info->callbacks->reloc_overflow) (info, NULL, sym_name,
+                                             howto->name, addend, NULL, NULL,
+                                             (bfd_vma) 0);
          break;
        }
 
index d30983aa88ef37995b90a67d8870b75150f52afb..774364a83aa481c066cd38dfb55500c44e5f77a0 100644 (file)
@@ -6063,13 +6063,10 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
          if (r_type != R_AARCH64_NONE && r_type != R_AARCH64_NULL
              && 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);
 
          relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
 
@@ -6411,10 +6408,9 @@ elfNN_aarch64_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);
              if (real_r_type == BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
                  || real_r_type == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14)
                {
@@ -6456,10 +6452,8 @@ alignment than was declared where it was defined."),
              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:
@@ -6480,10 +6474,8 @@ alignment than was declared where it was defined."),
 
            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;
            }
        }
index 22582976e82beffbf21f7dcafe486cd5d25264b4..b8e0e76c94200717506b1136d0fcc7e8041a61fc 100644 (file)
@@ -4428,10 +4428,9 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
            else
              name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym,
                                       sym_sec);
-           if (!(*info->callbacks->warning) (info, _("unsupported reloc"),
-                                             name, input_bfd,
-                                             input_section, rel->r_offset))
-             return FALSE;
+           (*info->callbacks->warning) (info, _("unsupported reloc"),
+                                        name, input_bfd,
+                                        input_section, rel->r_offset);
            ret_val = FALSE;
          }
          break;
@@ -4487,15 +4486,14 @@ missing_tls_sec:
                    break;
                  }
              default:
-               if (!(*info->callbacks->reloc_overflow) (info,
-                                                        &h->root,
-                                                        name,
-                                                        howto->name,
-                                                        (bfd_vma) 0,
-                                                        input_bfd,
-                                                        input_section,
-                                                        rel->r_offset))
-                 return FALSE;
+               (*info->callbacks->reloc_overflow) (info,
+                                                   &h->root,
+                                                   name,
+                                                   howto->name,
+                                                   (bfd_vma) 0,
+                                                   input_bfd,
+                                                   input_section,
+                                                   rel->r_offset);
                break;
              }
 
index c2c129039caaec7b91e16ac711cde0e3d89774eb..5143fcb43410c3554643d02fbd316e54259925af 100644 (file)
@@ -5410,17 +5410,14 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
             http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf  */
          symbol = 0;
        }
-      else if ((*info->callbacks->undefined_symbol)
-              (info, h->root.root.root.string, input_bfd,
-               input_section, relocation->r_offset,
-               (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
-                || ELF_ST_VISIBILITY (h->root.other)))
-       {
-         return bfd_reloc_undefined;
-       }
       else
        {
-         return bfd_reloc_notsupported;
+         (*info->callbacks->undefined_symbol)
+           (info, h->root.root.root.string, input_bfd,
+            input_section, relocation->r_offset,
+            (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+            || ELF_ST_VISIBILITY (h->root.other));
+         return bfd_reloc_undefined;
        }
 
       target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (h->root.other);
@@ -10250,10 +10247,9 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  htab->small_data_overflow_reported = TRUE;
                  (*info->callbacks->einfo) ("%P: %s\n", msg);
                }
-             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;
 
@@ -12929,25 +12925,22 @@ _bfd_elf_mips_get_relocated_section_contents
              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:
                default:
index bde53df2fe2917da2415c009dc4d4993411d52f5..d2c24d834caebd64e0f407a38038d04c350e022d 100644 (file)
@@ -4199,11 +4199,9 @@ do_relocation:
                    if (*name == '\0')
                      name = bfd_section_name (input_bfd, sec);
                  }
-               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;
            }
index 3423bacc6c16d4af0c43ec60a5d1208a66ff679c..db266c11c68604b96a27c94f754b302d327ccb58 100644 (file)
@@ -4044,15 +4044,14 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          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:
@@ -4073,11 +4072,8 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            }
 
          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);
        }
     }
 
index 082eea0715b0bd62820140bda518f690a6f9f63e..533eff8715d5375e462ce20a20e1816203ef3b94 100644 (file)
@@ -1544,9 +1544,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
          /* We have found a definition for a symbol which was
             previously common.  */
          BFD_ASSERT (h->type == bfd_link_hash_common);
-         if (! ((*info->callbacks->multiple_common)
-                (info, h, abfd, bfd_link_hash_defined, 0)))
-           return FALSE;
+         (*info->callbacks->multiple_common) (info, h, abfd,
+                                              bfd_link_hash_defined, 0);
          /* Fall through.  */
        case DEF:
        case DEFW:
@@ -1603,10 +1602,9 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
                        if (oldtype == bfd_link_hash_defweak)
                          abort ();
 
-                       if (! ((*info->callbacks->constructor)
-                              (info, c == 'I',
-                               h->root.string, abfd, section, value)))
-                         return FALSE;
+                       (*info->callbacks->constructor) (info, c == 'I',
+                                                        h->root.string, abfd,
+                                                        section, value);
                      }
                  }
              }
@@ -1675,9 +1673,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
             already had a common definition.  Use the maximum of the
             two sizes, and use the section required by the larger symbol.  */
          BFD_ASSERT (h->type == bfd_link_hash_common);
-         if (! ((*info->callbacks->multiple_common)
-                (info, h, abfd, bfd_link_hash_common, value)))
-           return FALSE;
+         (*info->callbacks->multiple_common) (info, h, abfd,
+                                              bfd_link_hash_common, value);
          if (value > h->u.c.size)
            {
              unsigned int power;
@@ -1715,9 +1712,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
        case CREF:
          /* We have found a common definition for a symbol which
             was already defined.  */
-         if (! ((*info->callbacks->multiple_common)
-                (info, h, abfd, bfd_link_hash_common, value)))
-           return FALSE;
+         (*info->callbacks->multiple_common) (info, h, abfd,
+                                              bfd_link_hash_common, value);
          break;
 
        case MIND:
@@ -1728,17 +1724,15 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
          /* Fall through.  */
        case MDEF:
          /* Handle a multiple definition.  */
-         if (! ((*info->callbacks->multiple_definition)
-                (info, h, abfd, section, value)))
-           return FALSE;
+         (*info->callbacks->multiple_definition) (info, h,
+                                                  abfd, section, value);
          break;
 
        case CIND:
          /* Create an indirect symbol from an existing common symbol.  */
          BFD_ASSERT (h->type == bfd_link_hash_common);
-         if (! ((*info->callbacks->multiple_common)
-                (info, h, abfd, bfd_link_hash_indirect, 0)))
-           return FALSE;
+         (*info->callbacks->multiple_common) (info, h, abfd,
+                                              bfd_link_hash_indirect, 0);
          /* Fall through.  */
        case IND:
          if (inh->type == bfd_link_hash_indirect
@@ -1779,9 +1773,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
 
        case SET:
          /* Add an entry to a set.  */
-         if (! (*info->callbacks->add_to_set) (info, h, BFD_RELOC_CTOR,
-                                               abfd, section, value))
-           return FALSE;
+         (*info->callbacks->add_to_set) (info, h, BFD_RELOC_CTOR,
+                                         abfd, section, value);
          break;
 
        case WARNC:
@@ -1790,10 +1783,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
          if (h->u.i.warning != NULL
              && (abfd->flags & BFD_PLUGIN) == 0)
            {
-             if (! (*info->callbacks->warning) (info, h->u.i.warning,
-                                                h->root.string, abfd,
-                                                NULL, 0))
-               return FALSE;
+             (*info->callbacks->warning) (info, h->u.i.warning,
+                                          h->root.string, abfd, NULL, 0);
              /* Only issue a warning once.  */
              h->u.i.warning = NULL;
            }
@@ -1819,9 +1810,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
               && (h->u.undef.next != NULL || info->hash->undefs_tail == h))
              || h->non_ir_ref)
            {
-             if (! (*info->callbacks->warning) (info, string, h->root.string,
-                                                hash_entry_bfd (h), NULL, 0))
-               return FALSE;
+             (*info->callbacks->warning) (info, string, h->root.string,
+                                          hash_entry_bfd (h), NULL, 0);
              break;
            }
          /* Fall through.  */
@@ -2412,9 +2402,8 @@ _bfd_generic_reloc_link_order (bfd *abfd,
       if (h == NULL
          || ! h->written)
        {
-         if (! ((*info->callbacks->unattached_reloc)
-                (info, link_order->u.reloc.p->u.name, NULL, NULL, 0)))
-           return FALSE;
+         (*info->callbacks->unattached_reloc)
+           (info, link_order->u.reloc.p->u.name, NULL, NULL, 0);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -2448,17 +2437,13 @@ _bfd_generic_reloc_link_order (bfd *abfd,
        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 (abfd, link_order->u.reloc.p->u.section)
-                  : link_order->u.reloc.p->u.name),
-                 r->howto->name, link_order->u.reloc.p->addend,
-                 NULL, NULL, 0)))
-           {
-             free (buf);
-             return FALSE;
-           }
+         (*info->callbacks->reloc_overflow)
+           (info, NULL,
+            (link_order->type == bfd_section_reloc_link_order
+             ? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
+             : link_order->u.reloc.p->u.name),
+            r->howto->name, link_order->u.reloc.p->addend,
+            NULL, NULL, 0);
          break;
        }
       loc = link_order->offset * bfd_octets_per_byte (abfd);
index 1f40be59731d17b624075bd436e5f1a657d4d743..74617fc8a771efc130d3c5b3d6aa9dd0a102c18f 100644 (file)
@@ -3070,9 +3070,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;
        }
     }
@@ -3167,18 +3166,14 @@ 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,
-                 (asection *) 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,
+            (asection *) NULL, (bfd_vma) 0);
          break;
        }
       ok = bfd_set_section_contents (flaginfo->output_bfd, o,
@@ -3355,10 +3350,9 @@ pdp11_aout_link_input_section (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;
                        }
                    }
@@ -3469,10 +3463,9 @@ pdp11_aout_link_input_section (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,
@@ -3504,11 +3497,9 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo,
                    s = aout_reloc_type_to_section (input_bfd, r_type);
                    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;
            }
index 53a5983abda9029e9392956354dab22098ca19f4..1dd85878d9150609afc85288abd3f038f6f6d2cf 100644 (file)
@@ -702,12 +702,9 @@ coff_pe_mips_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);
        }
 
       src = rel->r_vaddr + input_section->output_section->vma
index 1f210371b7486054b83f002680f1493366de52e9..443ad6f7553d6bd26d180288f5c1cb4c183ceec2 100644 (file)
@@ -8001,26 +8001,22 @@ bfd_generic_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:
index bae0fb08f6adf00854ea1411844e82acc8b1a63e..39e95f288fffc372e6f279a13950e11b0e3f94be 100644 (file)
@@ -80,11 +80,9 @@ bfd_coff_reloc16_get_value (arelent *reloc,
        value = 0;
       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;
        }
     }
index f05cc6e32e887e2152b8b4fcb0e0622e3874c7bb..7755af7781bdeb4b3889c1e6151e0b4ede0a9a7a 100644 (file)
@@ -24,7 +24,7 @@
 #include "libbfd.h"
 #include "bfdlink.h"
 
-static bfd_boolean
+static void
 simple_dummy_warning (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                      const char *warning ATTRIBUTE_UNUSED,
                      const char *symbol ATTRIBUTE_UNUSED,
@@ -32,10 +32,9 @@ simple_dummy_warning (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                      asection *section ATTRIBUTE_UNUSED,
                      bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                               const char *name ATTRIBUTE_UNUSED,
                               bfd *abfd ATTRIBUTE_UNUSED,
@@ -43,10 +42,9 @@ simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                               bfd_vma address ATTRIBUTE_UNUSED,
                               bfd_boolean fatal ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_reloc_overflow (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                             struct bfd_link_hash_entry *entry ATTRIBUTE_UNUSED,
                             const char *name ATTRIBUTE_UNUSED,
@@ -56,37 +54,33 @@ simple_dummy_reloc_overflow (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                             asection *section ATTRIBUTE_UNUSED,
                             bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_reloc_dangerous (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                              const char *message ATTRIBUTE_UNUSED,
                              bfd *abfd ATTRIBUTE_UNUSED,
                              asection *section ATTRIBUTE_UNUSED,
                              bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_unattached_reloc (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                               const char *name ATTRIBUTE_UNUSED,
                               bfd *abfd ATTRIBUTE_UNUSED,
                               asection *section ATTRIBUTE_UNUSED,
                               bfd_vma address ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
-static bfd_boolean
+static void
 simple_dummy_multiple_definition (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
                                  struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED,
                                  bfd *nbfd ATTRIBUTE_UNUSED,
                                  asection *nsec ATTRIBUTE_UNUSED,
                                  bfd_vma nval ATTRIBUTE_UNUSED)
 {
-  return TRUE;
 }
 
 static void
index 449354d26e2c1f238b39c98d61b3767cabf01a7a..b00ab2a54df11305c068dcb950dfcf5e3f1b1424 100644 (file)
@@ -1641,9 +1641,8 @@ _bfd_vms_get_value (bfd *abfd, const unsigned char *ascic,
     *vma = 0;
   else
     {
-      if (!(*info->callbacks->undefined_symbol)
-          (info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE))
-        abort ();
+      (*info->callbacks->undefined_symbol)
+       (info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE);
       *vma = 0;
     }
 }
index ca400965c9a35904efef4cb631e555f48caf4a1f..de7a9928461ca24af833130d1ff8a96d7cf5ce50 100644 (file)
@@ -1992,9 +1992,10 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
                     sure the XCOFF linker is wholly prepared to
                     handle them, and that would only be a warning,
                     not an error.  */
-                 if (! ((*info->callbacks->multiple_definition)
-                        (info, &(*sym_hash)->root, NULL, NULL, (bfd_vma) 0)))
-                   goto error_return;
+                 (*info->callbacks->multiple_definition) (info,
+                                                          &(*sym_hash)->root,
+                                                          NULL, NULL,
+                                                          (bfd_vma) 0);
                  /* Try not to give this error too many times.  */
                  (*sym_hash)->flags &= ~XCOFF_MULTIPLY_DEFINED;
                }
@@ -3117,11 +3118,8 @@ bfd_xcoff_import_symbol (bfd *output_bfd,
       if (h->root.type == bfd_link_hash_defined
          && (! bfd_is_abs_section (h->root.u.def.section)
              || h->root.u.def.value != val))
-       {
-         if (! ((*info->callbacks->multiple_definition)
-                (info, &h->root, output_bfd, bfd_abs_section_ptr, val)))
-           return FALSE;
-       }
+       (*info->callbacks->multiple_definition) (info, &h->root, output_bfd,
+                                                bfd_abs_section_ptr, val);
 
       h->root.type = bfd_link_hash_defined;
       h->root.u.def.section = bfd_abs_section_ptr;
@@ -4942,10 +4940,9 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo,
                               if (name == NULL)
                                 return FALSE;
 
-                              if (!(*flinfo->info->callbacks->unattached_reloc)
-                                  (flinfo->info, name, input_bfd, o,
-                                   irel->r_vaddr))
-                                return FALSE;
+                             (*flinfo->info->callbacks->unattached_reloc)
+                               (flinfo->info, name,
+                                input_bfd, o, irel->r_vaddr);
                             }
                        }
                    }
@@ -5712,9 +5709,8 @@ xcoff_reloc_link_order (bfd *output_bfd,
                                     FALSE, FALSE, TRUE));
   if (h == NULL)
     {
-      if (! ((*flinfo->info->callbacks->unattached_reloc)
-            (flinfo->info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0)))
-       return FALSE;
+      (*flinfo->info->callbacks->unattached_reloc)
+       (flinfo->info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0);
       return TRUE;
     }
 
@@ -5752,13 +5748,9 @@ xcoff_reloc_link_order (bfd *output_bfd,
        case bfd_reloc_outofrange:
          abort ();
        case bfd_reloc_overflow:
-         if (! ((*flinfo->info->callbacks->reloc_overflow)
-                (flinfo->info, NULL, link_order->u.reloc.p->u.name,
-                 howto->name, addend, NULL, NULL, (bfd_vma) 0)))
-           {
-             free (buf);
-             return FALSE;
-           }
+         (*flinfo->info->callbacks->reloc_overflow)
+           (flinfo->info, NULL, link_order->u.reloc.p->u.name,
+            howto->name, addend, NULL, NULL, (bfd_vma) 0);
          break;
        }
       ok = bfd_set_section_contents (output_bfd, output_section, (void *) buf,
@@ -6282,10 +6274,9 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
            {
              if ((*rel_hash)->indx < 0)
                {
-                 if (! ((*info->callbacks->unattached_reloc)
-                        (info, (*rel_hash)->root.root.string,
-                         NULL, o, irel->r_vaddr)))
-                   goto error_return;
+                 (*info->callbacks->unattached_reloc)
+                   (info, (*rel_hash)->root.root.string,
+                    NULL, o, irel->r_vaddr);
                  (*rel_hash)->indx = 0;
                }
              irel->r_symndx = (*rel_hash)->indx;
@@ -6298,10 +6289,9 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
        {
          if (toc_rel_hash->h->u.toc_indx < 0)
            {
-             if (! ((*info->callbacks->unattached_reloc)
-                    (info, toc_rel_hash->h->root.root.string,
-                     NULL, o, toc_rel_hash->rel->r_vaddr)))
-               goto error_return;
+             (*info->callbacks->unattached_reloc)
+               (info, toc_rel_hash->h->root.root.string,
+                NULL, o, toc_rel_hash->rel->r_vaddr);
              toc_rel_hash->h->u.toc_indx = 0;
            }
          toc_rel_hash->rel->r_symndx = toc_rel_hash->h->u.toc_indx;
index 14da5647739bafb6f765470dad36ea9b9a7c9fc2..86281872cd3c83bef843f1b4bc94b9e625c1f1c3 100644 (file)
@@ -1,3 +1,11 @@
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+       * 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-27  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * opencl-lang.c (evaluate_subexp_opencl): If
index 1b6505b3e4b82c5d8f9c2ae22e993fe6a9161f42..4392c150316503d4310e10577b1dc1e65ecb8b0b 100644 (file)
@@ -198,7 +198,7 @@ setup_sections (bfd *abfd, asection *sect, void *data_voidp)
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_multiple_definition (struct bfd_link_info *link_info,
                                    struct bfd_link_hash_entry *h, bfd *nbfd,
                                    asection *nsec, bfd_vma nval)
@@ -206,15 +206,14 @@ link_callbacks_multiple_definition (struct bfd_link_info *link_info,
   bfd *abfd = link_info->input_bfds;
 
   if (link_info->allow_multiple_definition)
-    return TRUE;
+    return;
   warning (_("Compiled module \"%s\": multiple symbol definitions: %s"),
           bfd_get_filename (abfd), h->root.string);
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_warning (struct bfd_link_info *link_info, const char *xwarning,
                         const char *symbol, bfd *abfd, asection *section,
                        bfd_vma address)
@@ -222,13 +221,11 @@ link_callbacks_warning (struct bfd_link_info *link_info, const char *xwarning,
   warning (_("Compiled module \"%s\" section \"%s\": warning: %s"),
           bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
           xwarning);
-  /* Maybe permit running as a module?  */
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_undefined_symbol (struct bfd_link_info *link_info,
                                 const char *name, bfd *abfd, asection *section,
                                 bfd_vma address, bfd_boolean is_fatal)
@@ -236,25 +233,22 @@ link_callbacks_undefined_symbol (struct bfd_link_info *link_info,
   warning (_("Cannot resolve relocation to \"%s\" "
             "from compiled module \"%s\" section \"%s\"."),
           name, bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_reloc_overflow (struct bfd_link_info *link_info,
                               struct bfd_link_hash_entry *entry,
                               const char *name, const char *reloc_name,
                               bfd_vma addend, bfd *abfd, asection *section,
                               bfd_vma address)
 {
-  /* TRUE is required for intra-module relocations.  */
-  return TRUE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_reloc_dangerous (struct bfd_link_info *link_info,
                                const char *message, bfd *abfd,
                                asection *section, bfd_vma address)
@@ -263,12 +257,11 @@ link_callbacks_reloc_dangerous (struct bfd_link_info *link_info,
             "relocation: %s\n"),
           bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
           message);
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
 
-static bfd_boolean
+static void
 link_callbacks_unattached_reloc (struct bfd_link_info *link_info,
                                 const char *name, bfd *abfd, asection *section,
                                 bfd_vma address)
@@ -277,7 +270,6 @@ link_callbacks_unattached_reloc (struct bfd_link_info *link_info,
             "relocation: %s\n"),
           bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
           name);
-  return FALSE;
 }
 
 /* Helper for link_callbacks callbacks vector.  */
index ea58b9985de98b44a2c306a036bc7edf78140cb5..8e9ea48691e22abc80ca6fce24b71923e7aabe39 100644 (file)
@@ -1,3 +1,10 @@
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
 2016-05-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
        * opcode/metag.h: wrap declarations in extern "C".
index 56ab03872baa958a232a575f1082b44e4b559d56..b392d54b3557690161beb5a13505668557041756 100644 (file)
@@ -609,11 +609,7 @@ struct bfd_link_info
 };
 
 /* This structures holds a set of callback functions.  These are called
-   by the BFD linker routines.  Except for the info functions, the first
-   argument to each callback function is the bfd_link_info structure
-   being used and each function returns a boolean value.  If the
-   function returns FALSE, then the BFD function which called it should
-   return with a failure indication.  */
+   by the BFD linker routines.  */
 
 struct bfd_link_callbacks
 {
@@ -622,14 +618,15 @@ struct bfd_link_callbacks
      name of the symbol which caused the archive element to be pulled
      in.  This function may set *SUBSBFD to point to an alternative
      BFD from which symbols should in fact be added in place of the
-     original BFD's symbols.  */
+     original BFD's symbols.  Returns TRUE if the object should be
+     added, FALSE if it should be skipped.  */
   bfd_boolean (*add_archive_element)
     (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd);
   /* A function which is called when a symbol is found with multiple
      definitions.  H is the symbol which is defined multiple times.
      NBFD is the new BFD, NSEC is the new section, and NVAL is the new
      value.  NSEC may be bfd_com_section or bfd_ind_section.  */
-  bfd_boolean (*multiple_definition)
+  void (*multiple_definition)
     (struct bfd_link_info *, struct bfd_link_hash_entry *h,
      bfd *nbfd, asection *nsec, bfd_vma nval);
   /* A function which is called when a common symbol is defined
@@ -638,7 +635,7 @@ struct bfd_link_callbacks
      symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
      bfd_link_hash_indirect.  If NTYPE is bfd_link_hash_common, NSIZE
      is the size of the new symbol.  */
-  bfd_boolean (*multiple_common)
+  void (*multiple_common)
     (struct bfd_link_info *, struct bfd_link_hash_entry *h,
      bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
   /* A function which is called to add a symbol to a set.  ENTRY is
@@ -647,7 +644,7 @@ struct bfd_link_callbacks
      the set when generating a relocatable file, and is also used to
      get the size of the entry when generating an executable file.
      ABFD, SEC and VALUE identify the value to add to the set.  */
-  bfd_boolean (*add_to_set)
+  void (*add_to_set)
     (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
      bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
   /* A function which is called when the name of a g++ constructor or
@@ -656,7 +653,7 @@ struct bfd_link_callbacks
      destructor.  This will use BFD_RELOC_CTOR when generating a
      relocatable file.  NAME is the name of the symbol found.  ABFD,
      SECTION and VALUE are the value of the symbol.  */
-  bfd_boolean (*constructor)
+  void (*constructor)
     (struct bfd_link_info *, bfd_boolean constructor, const char *name,
      bfd *abfd, asection *sec, bfd_vma value);
   /* A function which is called to issue a linker warning.  For
@@ -666,7 +663,7 @@ struct bfd_link_callbacks
      there is none.  ABFD, SECTION and ADDRESS identify the location
      which trigerred the warning; either ABFD or SECTION or both may
      be NULL if the location is not known.  */
-  bfd_boolean (*warning)
+  void (*warning)
     (struct bfd_link_info *, const char *warning, const char *symbol,
      bfd *abfd, asection *section, bfd_vma address);
   /* A function which is called when a relocation is attempted against
@@ -674,7 +671,7 @@ struct bfd_link_callbacks
      ABFD, SECTION and ADDRESS identify the location from which the
      reference is made. IS_FATAL indicates whether an undefined symbol is
      a fatal error or not. In some cases SECTION may be NULL.  */
-  bfd_boolean (*undefined_symbol)
+  void (*undefined_symbol)
     (struct bfd_link_info *, const char *name, bfd *abfd,
      asection *section, bfd_vma address, bfd_boolean is_fatal);
   /* A function which is called when a reloc overflow occurs. ENTRY is
@@ -685,7 +682,7 @@ struct bfd_link_callbacks
      location at which the overflow occurs; if this is the result of a
      bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
      ABFD will be NULL.  */
-  bfd_boolean (*reloc_overflow)
+  void (*reloc_overflow)
     (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
      const char *name, const char *reloc_name, bfd_vma addend,
      bfd *abfd, asection *section, bfd_vma address);
@@ -695,7 +692,7 @@ struct bfd_link_callbacks
      problem occurred; if this is the result of a
      bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
      ABFD will be NULL.  */
-  bfd_boolean (*reloc_dangerous)
+  void (*reloc_dangerous)
     (struct bfd_link_info *, const char *message,
      bfd *abfd, asection *section, bfd_vma address);
   /* A function which is called when a reloc is found to be attached
@@ -704,7 +701,7 @@ struct bfd_link_callbacks
      the reloc; if this is the result of a
      bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
      ABFD will be NULL.  */
-  bfd_boolean (*unattached_reloc)
+  void (*unattached_reloc)
     (struct bfd_link_info *, const char *name,
      bfd *abfd, asection *section, bfd_vma address);
   /* A function which is called when a symbol in notice_hash is
index 68277326e2dbf223021243115d6d9b12dc3080ab..fde9553fc7d9218c76d81b00f6837d8953f3a2ec 100644 (file)
@@ -1,3 +1,10 @@
+2016-05-28  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
 2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
 
        * testsuite/ld-mips-elf/unaligned-jalx-addend-0.d: New test.
index 4f5d1a4d2c029c521c31739fc86a4836fa8be014..c2ad2022ceed804dda1caa17ca64c03f2ad08ba0 100644 (file)
@@ -1582,7 +1582,6 @@ ${ELF_INTERPRETER_SET_DEFAULT}
        asection *s;
        bfd_size_type sz;
        char *msg;
-       bfd_boolean ret;
 
        if (is->flags.just_syms)
          continue;
@@ -1598,11 +1597,9 @@ ${ELF_INTERPRETER_SET_DEFAULT}
          einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
                 is->the_bfd);
        msg[sz] = '\0';
-       ret = link_info.callbacks->warning (&link_info, msg,
-                                           (const char *) NULL,
-                                           is->the_bfd, (asection *) NULL,
-                                           (bfd_vma) 0);
-       ASSERT (ret);
+       (*link_info.callbacks->warning) (&link_info, msg,
+                                        (const char *) NULL, is->the_bfd,
+                                        (asection *) NULL, (bfd_vma) 0);
        free (msg);
 
        /* Clobber the section size, so that we don't waste space
index 7d04be29bbcfb51077c2c43e904a211740d04b19..f16e33bfbf3b106a1b58135f9a4a5134cc266429 100644 (file)
@@ -107,32 +107,32 @@ static char *get_emulation
   (int, char **);
 static bfd_boolean add_archive_element
   (struct bfd_link_info *, bfd *, const char *, bfd **);
-static bfd_boolean multiple_definition
+static void multiple_definition
   (struct bfd_link_info *, struct bfd_link_hash_entry *,
    bfd *, asection *, bfd_vma);
-static bfd_boolean multiple_common
+static void multiple_common
   (struct bfd_link_info *, struct bfd_link_hash_entry *,
    bfd *, enum bfd_link_hash_type, bfd_vma);
-static bfd_boolean add_to_set
+static void add_to_set
   (struct bfd_link_info *, struct bfd_link_hash_entry *,
    bfd_reloc_code_real_type, bfd *, asection *, bfd_vma);
-static bfd_boolean constructor_callback
+static void constructor_callback
   (struct bfd_link_info *, bfd_boolean, const char *, bfd *,
    asection *, bfd_vma);
-static bfd_boolean warning_callback
+static void warning_callback
   (struct bfd_link_info *, const char *, const char *, bfd *,
    asection *, bfd_vma);
 static void warning_find_reloc
   (bfd *, asection *, void *);
-static bfd_boolean undefined_symbol
+static void undefined_symbol
   (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
    bfd_boolean);
-static bfd_boolean reloc_overflow
+static void reloc_overflow
   (struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
    const char *, bfd_vma, bfd *, asection *, bfd_vma);
-static bfd_boolean reloc_dangerous
+static void reloc_dangerous
   (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
-static bfd_boolean unattached_reloc
+static void unattached_reloc
   (struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
 static bfd_boolean notice
   (struct bfd_link_info *, struct bfd_link_hash_entry *,
@@ -906,7 +906,7 @@ add_archive_element (struct bfd_link_info *info,
 /* This is called when BFD has discovered a symbol which is defined
    multiple times.  */
 
-static bfd_boolean
+static void
 multiple_definition (struct bfd_link_info *info,
                     struct bfd_link_hash_entry *h,
                     bfd *nbfd,
@@ -919,7 +919,7 @@ multiple_definition (struct bfd_link_info *info,
   bfd_vma oval;
 
   if (info->allow_multiple_definition)
-    return TRUE;
+    return;
 
   switch (h->type)
     {
@@ -943,7 +943,7 @@ multiple_definition (struct bfd_link_info *info,
       && bfd_is_abs_section (osec)
       && bfd_is_abs_section (nsec)
       && nval == oval)
-    return TRUE;
+    return;
 
   /* If either section has the output_section field set to
      bfd_abs_section_ptr, it means that the section is being
@@ -956,7 +956,7 @@ multiple_definition (struct bfd_link_info *info,
       || (nsec->output_section != NULL
          && ! bfd_is_abs_section (nsec)
          && bfd_is_abs_section (nsec->output_section)))
-    return TRUE;
+    return;
 
   name = h->root.string;
   if (nbfd == NULL)
@@ -976,8 +976,6 @@ multiple_definition (struct bfd_link_info *info,
       einfo (_("%P: Disabling relaxation: it will not work with multiple definitions\n"));
       DISABLE_RELAXATION;
     }
-
-  return TRUE;
 }
 
 /* This is called when there is a definition of a common symbol, or
@@ -985,7 +983,7 @@ multiple_definition (struct bfd_link_info *info,
    or when two common symbols are found.  We only do something if
    -warn-common was used.  */
 
-static bfd_boolean
+static void
 multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                 struct bfd_link_hash_entry *h,
                 bfd *nbfd,
@@ -998,7 +996,7 @@ multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
   bfd_vma osize;
 
   if (!config.warn_common)
-    return TRUE;
+    return;
 
   name = h->root.string;
   otype = h->type;
@@ -1066,15 +1064,13 @@ multiple_common (struct bfd_link_info *info ATTRIBUTE_UNUSED,
            einfo (_("%B: warning: previous common is here\n"), obfd);
        }
     }
-
-  return TRUE;
 }
 
 /* This is called when BFD has discovered a set element.  H is the
    entry in the linker hash table for the set.  SECTION and VALUE
    represent a value which should be added to the set.  */
 
-static bfd_boolean
+static void
 add_to_set (struct bfd_link_info *info ATTRIBUTE_UNUSED,
            struct bfd_link_hash_entry *h,
            bfd_reloc_code_real_type reloc,
@@ -1087,7 +1083,7 @@ add_to_set (struct bfd_link_info *info ATTRIBUTE_UNUSED,
           h->root.string);
 
   if (! config.build_constructors)
-    return TRUE;
+    return;
 
   ldctor_add_set_entry (h, reloc, NULL, section, value);
 
@@ -1099,8 +1095,6 @@ add_to_set (struct bfd_link_info *info ATTRIBUTE_UNUSED,
         undefined symbols because we are going to define it
         ourselves.  */
     }
-
-  return TRUE;
 }
 
 /* This is called when BFD has discovered a constructor.  This is only
@@ -1108,7 +1102,7 @@ add_to_set (struct bfd_link_info *info ATTRIBUTE_UNUSED,
    constructors in some more clever fashion.  This is similar to
    adding an element to a set, but less general.  */
 
-static bfd_boolean
+static void
 constructor_callback (struct bfd_link_info *info,
                      bfd_boolean constructor,
                      const char *name,
@@ -1124,7 +1118,7 @@ constructor_callback (struct bfd_link_info *info,
     einfo (_("%P: warning: global constructor %s used\n"), name);
 
   if (! config.build_constructors)
-    return TRUE;
+    return;
 
   /* Ensure that BFD_RELOC_CTOR exists now, so that we can give a
      useful error message.  */
@@ -1154,7 +1148,6 @@ constructor_callback (struct bfd_link_info *info,
     }
 
   ldctor_add_set_entry (h, BFD_RELOC_CTOR, name, section, value);
-  return TRUE;
 }
 
 /* A structure used by warning_callback to pass information through
@@ -1189,7 +1182,7 @@ symbol_warning (const char *warning, const char *symbol, bfd *abfd)
 
 /* This is called when there is a reference to a warning symbol.  */
 
-static bfd_boolean
+static void
 warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                  const char *warning,
                  const char *symbol,
@@ -1201,7 +1194,7 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
      have a cleaner interface, but what?  */
   if (! config.warn_multiple_gp
       && strcmp (warning, "using multiple gp values") == 0)
-    return TRUE;
+    return;
 
   if (section != NULL)
     einfo ("%C: %s%s\n", abfd, section, address, _("warning: "), warning);
@@ -1215,11 +1208,9 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED,
       /* Search all input files for a reference to SYMBOL.  */
       for (b = info->input_bfds; b; b = b->link.next)
        if (b != abfd && symbol_warning (warning, symbol, b))
-         return TRUE;
+         return;
       einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
     }
-
-  return TRUE;
 }
 
 /* This is called by warning_callback for each section.  It checks the
@@ -1273,7 +1264,7 @@ warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
 
 /* This is called when an undefined symbol is found.  */
 
-static bfd_boolean
+static void
 undefined_symbol (struct bfd_link_info *info,
                  const char *name,
                  bfd *abfd,
@@ -1288,7 +1279,7 @@ undefined_symbol (struct bfd_link_info *info,
 
   if (info->ignore_hash != NULL
       && bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
-    return TRUE;
+    return;
 
   if (config.warn_once)
     {
@@ -1355,8 +1346,6 @@ undefined_symbol (struct bfd_link_info *info,
       else if (error)
        einfo ("%X");
     }
-
-  return TRUE;
 }
 
 /* Counter to limit the number of relocation overflow error messages
@@ -1370,7 +1359,7 @@ int overflow_cutoff_limit = 10;
 
 /* This is called when a reloc overflows.  */
 
-static bfd_boolean
+static void
 reloc_overflow (struct bfd_link_info *info,
                struct bfd_link_hash_entry *entry,
                const char *name,
@@ -1381,7 +1370,7 @@ reloc_overflow (struct bfd_link_info *info,
                bfd_vma address)
 {
   if (overflow_cutoff_limit == -1)
-    return TRUE;
+    return;
 
   einfo ("%X%H:", abfd, section, address);
 
@@ -1389,7 +1378,7 @@ reloc_overflow (struct bfd_link_info *info,
       && overflow_cutoff_limit-- == 0)
     {
       einfo (_(" additional relocation overflows omitted from the output\n"));
-      return TRUE;
+      return;
     }
 
   if (entry)
@@ -1423,12 +1412,11 @@ reloc_overflow (struct bfd_link_info *info,
   if (addend != 0)
     einfo ("+%v", addend);
   einfo ("\n");
-  return TRUE;
 }
 
 /* This is called when a dangerous relocation is made.  */
 
-static bfd_boolean
+static void
 reloc_dangerous (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                 const char *message,
                 bfd *abfd,
@@ -1437,13 +1425,12 @@ reloc_dangerous (struct bfd_link_info *info ATTRIBUTE_UNUSED,
 {
   einfo (_("%X%H: dangerous relocation: %s\n"),
         abfd, section, address, message);
-  return TRUE;
 }
 
 /* This is called when a reloc is being generated attached to a symbol
    that is not being output.  */
 
-static bfd_boolean
+static void
 unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                  const char *name,
                  bfd *abfd,
@@ -1452,7 +1439,6 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
 {
   einfo (_("%X%H: reloc refers to symbol `%T' which is not being output\n"),
         abfd, section, address, name);
-  return TRUE;
 }
 
 /* This is called if link_info.notice_all is set, or when a symbol in
This page took 0.122681 seconds and 4 git commands to generate.