+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>
}
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;
}
}
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,
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;
}
}
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,
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;
}
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;
}
}
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)
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;
}
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;
}
}
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:
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;
}
}
/* 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,
&& 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,
}
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;
}
}
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;
}
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);
}
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. */
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);
}
}
}
/* 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. */
/* 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. */
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. */
/* 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])
/* 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])
/* 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. */
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;
}
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)++;
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;
+ 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;
/* 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:
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);
}
}
}
+ 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;
}
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);
}
}
{
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);
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;
}
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;
}
}
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;
}
+ 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;
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);
}
}
}
{
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)
{
}
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. */
+ 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,
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);
}
}
}
}
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;
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);
}
}
}
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;
/* 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);
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;
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)++;
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)++;
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);
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),
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;
{
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)
{
}
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. */
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);
}
}
}
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);
}
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;
}
}
}
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
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);
}
}
}
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,
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;
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; \
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:
/* 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;
}
}
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:
{
/* 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)
&& 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)
{
/* 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:
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;
}
}
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;
}
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);
}
}
}
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)
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;
}
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);
}
}
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:
/* 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;
}
}
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:
/* 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;
}
}
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)
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:
}
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);
}
}
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:
/* 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;
}
}
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:
/* 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;
}
}
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;
}
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);
}
}
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:
}
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);
}
}
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;
input_bfd, input_section, rel->r_offset, name, msg);
return FALSE;
}
-
- if (! r)
- return FALSE;
}
}
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:
}
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);
}
}
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:
/* 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;
}
}
&& 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;
}
}
}
}
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;
;
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;
}
}
}
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)
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;
}
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);
}
}
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;
}
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);
}
}
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;
}
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);
}
}
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:
/* 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;
}
}
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))
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:
}
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);
}
}
&& 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))
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:
/* 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;
}
}
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);
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);
}
"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;
}
}
(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;
}
"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;
}
"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;
}
}
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:
/* 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;
}
}
}
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)
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;
}
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);
}
}
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:
}
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);
}
}
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:
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;
}
}
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:
}
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);
}
}
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:
}
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);
}
}
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;
}
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);
}
}
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:
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;
}
}
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:
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:
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;
}
}
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;
}
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);
}
}
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;
&& (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
{
\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,
|| (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;
}
}
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;
}
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;
}
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;
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:
if (msg)
_bfd_error_handler (msg, input_bfd, input_section, name);
-
- if (! r)
- return FALSE;
}
}
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;
\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,
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
return value;
}
+
static bfd_vma
get_symbol_value_maybe (const char * name,
struct bfd_link_info * info)
}
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)
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)
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)
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;
bfd_vma entry_vma;
int idx;
char *buf;
- bfd_reloc_status_type tstat = 0;
if (table_default_cache != name)
{
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,
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;
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);
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);
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:
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:
if (msg)
_bfd_error_handler (msg, input_bfd, input_section, name);
-
- if (! r)
- return FALSE;
}
}
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:
rel ++;
}
+ /* FIXME. */
+ (void) r;
}
static void
}
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)
}
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;
}
}
/* 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:
/* 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;
}
}
}
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;
}
}
/* 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:
/* 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;
}
}
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. */
&& 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))
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;
}
&& ((*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
{
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;
}
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:
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;
}
}
/* 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:
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;
}
}
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:
}
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);
}
}
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:
/* 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;
}
}
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;
}
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;
}
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);
}
}
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:
}
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);
}
}
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);
}
}
}
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;
{
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)
{
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
{
{
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;
(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)
{
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;
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);
}
}
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;
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)
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);
}
}
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;
}
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;
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;
}
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;
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;
}
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);
}
}
&& (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
{
}
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)
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. */
&& 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))
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;
}
}
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)
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;
/* 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. */
&& (!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)
}
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;
}
}
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;
}
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);
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)
{
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:
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;
}
}
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;
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;
}
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);
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;
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:
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;
}
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:
}
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);
}
}
/* 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:
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);
}
}
}
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;
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:
/* 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
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:
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;
}
&& (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. */
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;
}
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);
}
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;
}
}
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,
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;
}
}
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,
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;
}
}
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
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:
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;
}
}
#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,
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,
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,
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
*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;
}
}
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;
}
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;
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);
}
}
}
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;
}
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,
{
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;
{
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;
+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
/* 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)
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)
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)
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)
"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)
"relocation: %s\n"),
bfd_get_filename (abfd), bfd_get_section_name (abfd, section),
name);
- return FALSE;
}
/* Helper for link_callbacks callbacks vector. */
+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".
};
/* 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
{
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
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
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
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
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
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
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);
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
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
+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.
asection *s;
bfd_size_type sz;
char *msg;
- bfd_boolean ret;
if (is->flags.just_syms)
continue;
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
(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 *,
/* 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,
bfd_vma oval;
if (info->allow_multiple_definition)
- return TRUE;
+ return;
switch (h->type)
{
&& 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
|| (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)
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
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,
bfd_vma osize;
if (!config.warn_common)
- return TRUE;
+ return;
name = h->root.string;
otype = h->type;
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,
h->root.string);
if (! config.build_constructors)
- return TRUE;
+ return;
ldctor_add_set_entry (h, reloc, NULL, section, value);
undefined symbols because we are going to define it
ourselves. */
}
-
- return TRUE;
}
/* This is called when BFD has discovered a constructor. This is only
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,
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. */
}
ldctor_add_set_entry (h, BFD_RELOC_CTOR, name, section, value);
- return TRUE;
}
/* A structure used by warning_callback to pass information through
/* 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,
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);
/* 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
/* 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,
if (info->ignore_hash != NULL
&& bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
- return TRUE;
+ return;
if (config.warn_once)
{
else if (error)
einfo ("%X");
}
-
- return TRUE;
}
/* Counter to limit the number of relocation overflow error messages
/* 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,
bfd_vma address)
{
if (overflow_cutoff_limit == -1)
- return TRUE;
+ return;
einfo ("%X%H:", abfd, section, address);
&& overflow_cutoff_limit-- == 0)
{
einfo (_(" additional relocation overflows omitted from the output\n"));
- return TRUE;
+ return;
}
if (entry)
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,
{
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,
{
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