diff options
author | Alan Modra <amodra@gmail.com> | 2016-09-30 13:00:18 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-09-30 15:17:44 +0930 |
commit | 4eca02287cf48e60ee89338ddd35f8d0d8257a51 (patch) | |
tree | 8ca78e581fa1260b8a1073e7e1a92d46e8bfabf6 /bfd/mach-o.c | |
parent | 4519d071387f374932616b588ddb4ec8cabe2a52 (diff) | |
download | gdb-4eca02287cf48e60ee89338ddd35f8d0d8257a51.zip gdb-4eca02287cf48e60ee89338ddd35f8d0d8257a51.tar.gz gdb-4eca02287cf48e60ee89338ddd35f8d0d8257a51.tar.bz2 |
Remove syntactic sugar
Now that _bfd_error_handler is not a function pointer.
* aout-adobe.c: Replace (*_bfd_error_handler) (...) with
_bfd_error_handler (...) throughout.
* aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c,
* cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c,
* coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
* coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
* coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c,
* ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
* elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c,
* elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c,
* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
* elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
* elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c,
* elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
* elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c,
* elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
* elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c,
* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
* elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
* elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c,
* elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c,
* elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c,
* ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c,
* mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c,
* pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c,
* rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c,
* stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c,
* xcofflink.c: Likewise.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r-- | bfd/mach-o.c | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 1609980..80aa499 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -775,7 +775,7 @@ bfd_mach_o_canonicalize_symtab (bfd *abfd, asymbol **alocation) if (!bfd_mach_o_read_symtab_symbols (abfd)) { - (*_bfd_error_handler) + _bfd_error_handler (_("bfd_mach_o_canonicalize_symtab: unable to load symbols")); return 0; } @@ -1978,8 +1978,8 @@ bfd_mach_o_build_dysymtab (bfd *abfd, bfd_mach_o_dysymtab_command *cmd) || cmd->ntoc != 0 || cmd->nextrefsyms != 0) { - (*_bfd_error_handler) (_("sorry: modtab, toc and extrefsyms are not yet" - " implemented for dysymtab commands.")); + _bfd_error_handler (_("sorry: modtab, toc and extrefsyms are not yet" + " implemented for dysymtab commands.")); return FALSE; } @@ -2421,8 +2421,8 @@ bfd_mach_o_mangle_sections (bfd *abfd, bfd_mach_o_data_struct *mdata) /* We need to check that this can be done... */ if (nsect > 255) { - (*_bfd_error_handler) (_("mach-o: there are too many sections (%u)" - " maximum is 255,\n"), nsect); + _bfd_error_handler (_("mach-o: there are too many sections (%u)" + " maximum is 255,\n"), nsect); return FALSE; } @@ -2527,7 +2527,7 @@ bfd_mach_o_write_contents (bfd *abfd) /* Nothing to do. */ break; default: - (*_bfd_error_handler) + _bfd_error_handler (_("unable to allocate data for load command 0x%lx"), (unsigned long) cmd->type); break; @@ -2632,7 +2632,7 @@ bfd_mach_o_write_contents (bfd *abfd) return FALSE; break; default: - (*_bfd_error_handler) + _bfd_error_handler (_("unable to write unknown load command 0x%lx"), (unsigned long) cmd->type); return FALSE; @@ -2815,7 +2815,7 @@ bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) if (s->addr < vma) { - (*_bfd_error_handler) + _bfd_error_handler (_("section address (%lx) below start of segment (%lx)"), (unsigned long) s->addr, (unsigned long) vma); return FALSE; @@ -2956,7 +2956,7 @@ bfd_mach_o_layout_commands (bfd_mach_o_data_struct *mdata) + BFD_MACH_O_LC_SIZE; break; default: - (*_bfd_error_handler) + _bfd_error_handler (_("unable to layout unknown load command 0x%lx"), (unsigned long) cmd->type); ret = FALSE; @@ -3492,8 +3492,9 @@ bfd_mach_o_read_section_32 (bfd *abfd, unsigned long prot) /* PR 17512: file: 0017eb76. */ if (section->align > 64) { - (*_bfd_error_handler) (_("bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, using 32 instead"), - section->align); + _bfd_error_handler + (_("bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, " + "using 32 instead"), section->align); section->align = 32; } section->reloff = bfd_h_get_32 (abfd, raw.reloff); @@ -3534,8 +3535,9 @@ bfd_mach_o_read_section_64 (bfd *abfd, unsigned long prot) section->align = bfd_h_get_32 (abfd, raw.align); if (section->align > 64) { - (*_bfd_error_handler) (_("bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, using 32 instead"), - section->align); + _bfd_error_handler + (_("bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, " + "using 32 instead"), section->align); section->align = 32; } section->reloff = bfd_h_get_32 (abfd, raw.reloff); @@ -3583,7 +3585,7 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, if (bfd_seek (abfd, symoff, SEEK_SET) != 0 || bfd_bread (&raw, symwidth, abfd) != symwidth) { - (*_bfd_error_handler) + _bfd_error_handler (_("bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"), symwidth, (unsigned long) symoff); return FALSE; @@ -3601,7 +3603,7 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, if (stroff >= sym->strsize) { - (*_bfd_error_handler) + _bfd_error_handler (_("bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"), (unsigned long) stroff, (unsigned long) sym->strsize); @@ -3683,9 +3685,11 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, /* Mach-O uses 0 to mean "no section"; not an error. */ if (section != 0) { - (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: " - "symbol \"%s\" specified invalid section %d (max %lu): setting to undefined"), - s->symbol.name, section, mdata->nsects); + _bfd_error_handler + (_("bfd_mach_o_read_symtab_symbol: " + "symbol \"%s\" specified invalid section %d (max %lu): " + "setting to undefined"), + s->symbol.name, section, mdata->nsects); } s->symbol.section = bfd_und_section_ptr; } @@ -3699,9 +3703,10 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, s->symbol.value = 0; break; default: - (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbol: " - "symbol \"%s\" specified invalid type field 0x%x: setting to undefined"), - s->symbol.name, symtype); + _bfd_error_handler + (_("bfd_mach_o_read_symtab_symbol: " + "symbol \"%s\" specified invalid type field 0x%x: " + "setting to undefined"), s->symbol.name, symtype); s->symbol.section = bfd_und_section_ptr; break; } @@ -3773,7 +3778,8 @@ bfd_mach_o_read_symtab_symbols (bfd *abfd) sym->symbols = bfd_alloc2 (abfd, sym->nsyms, sizeof (bfd_mach_o_asymbol)); if (sym->symbols == NULL) { - (*_bfd_error_handler) (_("bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols")); + _bfd_error_handler (_("bfd_mach_o_read_symtab_symbols: " + "unable to allocate memory for symbols")); sym->nsyms = 0; return FALSE; } @@ -4745,8 +4751,8 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command) break; default: command->len = 0; - (*_bfd_error_handler)(_("%B: unknown load command 0x%lx"), - abfd, (unsigned long) command->type); + _bfd_error_handler (_("%B: unknown load command 0x%lx"), + abfd, (unsigned long) command->type); return FALSE; } @@ -4934,7 +4940,7 @@ bfd_mach_o_scan (bfd *abfd, &cputype, &cpusubtype); if (cputype == bfd_arch_unknown) { - (*_bfd_error_handler) + _bfd_error_handler (_("bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"), header->cputype, header->cpusubtype); return FALSE; @@ -5040,8 +5046,8 @@ bfd_mach_o_header_p (bfd *abfd, if (! (header.byteorder == BFD_ENDIAN_BIG || header.byteorder == BFD_ENDIAN_LITTLE)) { - (*_bfd_error_handler) (_("unknown header byte-order value 0x%lx"), - (unsigned long) header.byteorder); + _bfd_error_handler (_("unknown header byte-order value 0x%lx"), + (unsigned long) header.byteorder); goto wrong; } |