diff options
Diffstat (limited to 'bfd')
41 files changed, 180 insertions, 129 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d2791d6..ea4808d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,48 @@ 2020-02-26 Alan Modra <amodra@gmail.com> + * aoutx.h: Indent labels correctly. Format error strings. + * archive.c: Likewise. + * archive64.c: Likewise. + * coff-arm.c: Likewise. + * coff-rs6000.c: Likewise. + * coff-stgo32.c: Likewise. + * cpu-arm.c: Likewise. + * dwarf2.c: Likewise. + * elf-ifunc.c: Likewise. + * elf-properties.c: Likewise. + * elf-s390-common.c: Likewise. + * elf-strtab.c: Likewise. + * elf.c: Likewise. + * elf32-arm.c: Likewise. + * elf32-bfin.c: Likewise. + * elf32-cr16.c: Likewise. + * elf32-csky.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-m68k.c: Likewise. + * elf32-msp430.c: Likewise. + * elf32-nds32.c: Likewise. + * elf32-nios2.c: Likewise. + * elf32-pru.c: Likewise. + * elf32-xtensa.c: Likewise. + * elf64-ia64-vms.c: Likewise. + * elf64-x86-64.c: Likewise. + * elfcode.h: Likewise. + * elfcore.h: Likewise. + * elflink.c: Likewise. + * elfnn-aarch64.c: Likewise. + * elfnn-ia64.c: Likewise. + * elfnn-riscv.c: Likewise. + * elfxx-mips.c: Likewise. + * elfxx-sparc.c: Likewise. + * elfxx-x86.c: Likewise. + * i386lynx.c: Likewise. + * merge.c: Likewise. + * pdp11.c: Likewise. + * plugin.c: Likewise. + * reloc.c: Likewise. + +2020-02-26 Alan Modra <amodra@gmail.com> + PR 25593 * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to "dyn_loaded". diff --git a/bfd/aoutx.h b/bfd/aoutx.h index fef75e5..4fb1282 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -1901,7 +1901,7 @@ NAME (aout, write_syms) (bfd *abfd) return TRUE; -error_return: + error_return: _bfd_stringtab_free (strtab); return FALSE; } @@ -2381,8 +2381,8 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) || (*generic)->sym_ptr_ptr == NULL) { bfd_set_error (bfd_error_invalid_operation); - _bfd_error_handler (_("\ -%pB: attempt to write out unknown reloc type"), abfd); + _bfd_error_handler (_("%pB: attempt to write out " + "unknown reloc type"), abfd); return FALSE; } MY_swap_ext_reloc_out (abfd, *generic, @@ -2399,8 +2399,8 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) || (*generic)->sym_ptr_ptr == NULL) { bfd_set_error (bfd_error_invalid_operation); - _bfd_error_handler (_("\ -%pB: attempt to write out unknown reloc type"), abfd); + _bfd_error_handler (_("%pB: attempt to write out " + "unknown reloc type"), abfd); return FALSE; } MY_swap_std_reloc_out (abfd, *generic, diff --git a/bfd/archive.c b/bfd/archive.c index d2a9a65..1b783c4 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -1131,7 +1131,7 @@ do_slurp_coff_armap (bfd *abfd) return TRUE; -release_symdefs: + release_symdefs: bfd_release (abfd, (ardata)->symdefs); return FALSE; } diff --git a/bfd/archive64.c b/bfd/archive64.c index 5cad723..d4b0c3c 100644 --- a/bfd/archive64.c +++ b/bfd/archive64.c @@ -139,7 +139,7 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) return TRUE; -release_symdefs: + release_symdefs: bfd_release (abfd, ardata->symdefs); return FALSE; } diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c index b7ebe96..53e4d3c 100644 --- a/bfd/coff-arm.c +++ b/bfd/coff-arm.c @@ -2210,7 +2210,8 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) { _bfd_error_handler /* xgettext: c-format */ - (_("error: %pB is compiled for APCS-%d, whereas %pB is compiled for APCS-%d"), + (_("error: %pB is compiled for APCS-%d, " + "whereas %pB is compiled for APCS-%d"), ibfd, APCS_26_FLAG (ibfd) ? 26 : 32, obfd, APCS_26_FLAG (obfd) ? 26 : 32 ); @@ -2223,14 +2224,16 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) { if (APCS_FLOAT_FLAG (ibfd)) /* xgettext: c-format */ - _bfd_error_handler (_("\ -error: %pB passes floats in float registers, whereas %pB passes them in integer registers"), - ibfd, obfd); + _bfd_error_handler + (_("error: %pB passes floats in float registers, " + "whereas %pB passes them in integer registers"), + ibfd, obfd); else /* xgettext: c-format */ - _bfd_error_handler (_("\ -error: %pB passes floats in integer registers, whereas %pB passes them in float registers"), - ibfd, obfd); + _bfd_error_handler + (_("error: %pB passes floats in integer registers, " + "whereas %pB passes them in float registers"), + ibfd, obfd); bfd_set_error (bfd_error_wrong_format); return FALSE; @@ -2240,14 +2243,16 @@ error: %pB passes floats in integer registers, whereas %pB passes them in float { if (PIC_FLAG (ibfd)) /* xgettext: c-format */ - _bfd_error_handler (_("\ -error: %pB is compiled as position independent code, whereas target %pB is absolute position"), - ibfd, obfd); + _bfd_error_handler + (_("error: %pB is compiled as position independent code, " + "whereas target %pB is absolute position"), + ibfd, obfd); else /* xgettext: c-format */ - _bfd_error_handler (_("\ -error: %pB is compiled as absolute position code, whereas target %pB is position independent"), - ibfd, obfd); + _bfd_error_handler + (_("error: %pB is compiled as absolute position code, " + "whereas target %pB is position independent"), + ibfd, obfd); bfd_set_error (bfd_error_wrong_format); return FALSE; @@ -2272,14 +2277,15 @@ error: %pB is compiled as absolute position code, whereas target %pB is position { if (INTERWORK_FLAG (ibfd)) /* xgettext: c-format */ - _bfd_error_handler (_("\ -warning: %pB supports interworking, whereas %pB does not"), + _bfd_error_handler (_("warning: %pB supports interworking, " + "whereas %pB does not"), ibfd, obfd); else /* xgettext: c-format */ - _bfd_error_handler (_("\ -warning: %pB does not support interworking, whereas %pB does"), - ibfd, obfd); + _bfd_error_handler + (_("warning: %pB does not support interworking, " + "whereas %pB does"), + ibfd, obfd); } } else @@ -2428,9 +2434,11 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest) if (INTERWORK_FLAG (dest)) { /* xgettext:c-format */ - _bfd_error_handler (_("\ -warning: clearing the interworking flag of %pB because non-interworking code in %pB has been linked with it"), - dest, src); + _bfd_error_handler + (_("warning: clearing the interworking flag of %pB " + "because non-interworking code in %pB has been " + "linked with it"), + dest, src); } SET_INTERWORK_FLAG (dest, 0); diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index c30b360..8b8f472 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -652,7 +652,7 @@ _bfd_xcoff_swap_aux_out (bfd *abfd, void * inp, int type, int in_class, ext->x_sym.x_misc.x_lnsz.x_size); } -end: + end: return bfd_coff_auxesz (abfd); } diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c index a2b0597..6984b42 100644 --- a/bfd/coff-stgo32.c +++ b/bfd/coff-stgo32.c @@ -362,7 +362,7 @@ create_go32_stub (bfd *abfd) } close (f); } -stub_end: + stub_end: /* There was something wrong above, so use now the standard builtin stub. */ if (coff_data (abfd)->go32stub == NULL) diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index a9a8965..903ad84 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -300,8 +300,8 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd) || out == bfd_mach_arm_iWMMXt2)) { /* xgettext: c-format */ - _bfd_error_handler (_("\ -error: %pB is compiled for the EP9312, whereas %pB is compiled for XScale"), + _bfd_error_handler (_("error: %pB is compiled for the EP9312, " + "whereas %pB is compiled for XScale"), ibfd, obfd); bfd_set_error (bfd_error_wrong_format); return FALSE; @@ -312,8 +312,8 @@ error: %pB is compiled for the EP9312, whereas %pB is compiled for XScale"), || in == bfd_mach_arm_iWMMXt2)) { /* xgettext: c-format */ - _bfd_error_handler (_("\ -error: %pB is compiled for the EP9312, whereas %pB is compiled for XScale"), + _bfd_error_handler (_("error: %pB is compiled for the EP9312, " + "whereas %pB is compiled for XScale"), obfd, ibfd); bfd_set_error (bfd_error_wrong_format); return FALSE; diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index cd7aa28..f7fb002 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -2599,7 +2599,7 @@ lookup_address_in_line_info_table (struct line_info_table *table, return seq->last_line->address - seq->low_pc; } -fail: + fail: *filename_ptr = NULL; return 0; } diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c index 489141c..b044164 100644 --- a/bfd/elf-ifunc.c +++ b/bfd/elf-ifunc.c @@ -201,7 +201,7 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, return TRUE; } -keep: + keep: bed = get_elf_backend_data (info->output_bfd); if (bed->rela_plts_and_copies_p) sizeof_reloc = bed->s->sizeof_rela; diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c index 76ddad6..21bb071 100644 --- a/bfd/elf-properties.c +++ b/bfd/elf-properties.c @@ -86,7 +86,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) if (note->descsz < 8 || (note->descsz % align_size) != 0) { -bad_size: + bad_size: _bfd_error_handler (_("warning: %pB: corrupt GNU_PROPERTY_TYPE (%ld) size: %#lx"), abfd, note->type, note->descsz); @@ -186,7 +186,7 @@ bad_size: (_("warning: %pB: unsupported GNU_PROPERTY_TYPE (%ld) type: 0x%x"), abfd, note->type, type); -next: + next: ptr += (datasz + (align_size - 1)) & ~ (align_size - 1); } diff --git a/bfd/elf-s390-common.c b/bfd/elf-s390-common.c index 8df8dba..dd318b0 100644 --- a/bfd/elf-s390-common.c +++ b/bfd/elf-s390-common.c @@ -212,7 +212,7 @@ s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, return TRUE; } -keep: + keep: /* Without checking h->plt.refcount here we allocate a PLT slot. When setting plt.refcount in check_relocs it might not have been known that this will be an IFUNC symol. */ diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index c397180..35b8219 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -442,7 +442,7 @@ _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab) } } -alloc_failure: + alloc_failure: if (array) free (array); @@ -7704,7 +7704,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd) return copy_elf_program_header (ibfd, obfd); } -rewrite: + rewrite: if (ibfd->xvec == obfd->xvec) { /* When rewriting program header, set the output maxpagesize to @@ -8596,11 +8596,11 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bfd_boolean default_imported_symver) if (hdr->sh_info == 0 || hdr->sh_info > hdr->sh_size / sizeof (Elf_External_Verneed)) { -error_return_bad_verref: + error_return_bad_verref: _bfd_error_handler (_("%pB: .gnu.version_r invalid entry"), abfd); bfd_set_error (bfd_error_bad_value); -error_return_verref: + error_return_verref: elf_tdata (abfd)->verref = NULL; elf_tdata (abfd)->cverrefs = 0; goto error_return; diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index a35dc99..e9d93cc 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6415,7 +6415,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, ret = FALSE; } -free_sym_buf: + free_sym_buf: free (sympp); return ret; } @@ -7991,7 +7991,7 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, return TRUE; -error_return: + error_return: if (contents != NULL && elf_section_data (sec)->this_hdr.contents != contents) free (contents); @@ -8607,7 +8607,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) return TRUE; -error_return: + error_return: if (contents != NULL && elf_section_data (sec)->this_hdr.contents != contents) free (contents); @@ -9044,7 +9044,7 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, return TRUE; -error_return: + error_return: if (contents != NULL && elf_section_data (sec)->this_hdr.contents != contents) free (contents); diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 7ebd919..e5a83ba 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -5398,7 +5398,7 @@ bfd_bfin_elf32_create_embedded_relocs (bfd *abfd, free (internal_relocs); return TRUE; -error_return: + error_return: if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (internal_relocs != NULL diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c index 6d1e669..c74cb22 100644 --- a/bfd/elf32-cr16.c +++ b/bfd/elf32-cr16.c @@ -2854,7 +2854,7 @@ bfd_cr16_elf32_create_embedded_relocs (bfd *abfd, free (internal_relocs); return TRUE; -error_return: + error_return: if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (internal_relocs != NULL diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c index f91d05b..6cf63f5 100644 --- a/bfd/elf32-csky.c +++ b/bfd/elf32-csky.c @@ -3413,7 +3413,7 @@ elf32_csky_size_stubs (bfd *output_bfd, if (r_type >= (unsigned int) R_CKCORE_MAX) { bfd_set_error (bfd_error_bad_value); -error_ret_free_internal: + error_ret_free_internal: if (elf_section_data (section)->relocs == NULL) free (internal_relocs); goto error_ret_free_local; @@ -3592,7 +3592,7 @@ error_ret_free_internal: } return TRUE; -error_ret_free_local: + error_ret_free_local: return FALSE; } diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 88076b5..eb7e1f8 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1327,7 +1327,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, && local_ref) { /* The function is locally defined. */ -convert_branch: + convert_branch: /* Convert R_386_GOT32X to R_386_PC32. */ if (modrm == 0x15 || (modrm & 0xf8) == 0x90) { @@ -1393,7 +1393,7 @@ convert_branch: || h->root.type == bfd_link_hash_defweak) && local_ref)) { -convert_load: + convert_load: if (opcode == 0x8b) { if (to_reloc_32) @@ -1739,7 +1739,7 @@ elf_i386_check_relocs (bfd *abfd, case R_386_GOTOFF: case R_386_GOTPC: -create_got: + create_got: if (r_type != R_386_TLS_IE) { if (eh != NULL) @@ -1769,7 +1769,7 @@ create_got: case R_386_PC32: if (eh != NULL && (sec->flags & SEC_CODE) != 0) eh->zero_undefweak |= 0x2; -do_relocation: + do_relocation: /* We are called after all symbols have been resolved. Only relocation against STT_GNU_IFUNC symbol must go through PLT. */ @@ -1826,7 +1826,7 @@ do_relocation: } size_reloc = FALSE; -do_size: + do_size: if (NEED_DYNAMIC_RELOCATION_P (info, FALSE, h, sec, r_type, R_386_32)) { @@ -1931,7 +1931,7 @@ do_size: return TRUE; -error_return: + error_return: if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); sec->check_relocs_failed = 1; @@ -2362,7 +2362,7 @@ elf_i386_relocate_section (bfd *output_bfd, switch (r_type) { default: -bad_ifunc_reloc: + bad_ifunc_reloc: if (h->root.root.string) name = h->root.root.string; else @@ -2386,7 +2386,7 @@ bad_ifunc_reloc: asection *sreloc; bfd_vma offset; -do_ifunc_pointer: + do_ifunc_pointer: /* Need a dynamic relocation to get the real function adddress. */ offset = _bfd_elf_section_offset (output_bfd, @@ -2449,7 +2449,7 @@ do_ifunc_pointer: } } -skip_ifunc: + skip_ifunc: resolved_to_zero = (eh != NULL && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh)); @@ -2551,7 +2551,7 @@ skip_ifunc: we don't know what the GOT base is. */ const char *name; -disallow_got32: + disallow_got32: if (h == NULL || h->root.root.string == NULL) name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, NULL); @@ -3409,12 +3409,12 @@ disallow_got32: return FALSE; } -do_relocation: + do_relocation: r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, 0); -check_relocation_error: + check_relocation_error: if (r != bfd_reloc_ok) { const char *name; @@ -3848,7 +3848,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, else { BFD_ASSERT((h->got.offset & 1) == 0); -do_glob_dat: + do_glob_dat: bfd_put_32 (output_bfd, (bfd_vma) 0, htab->elf.sgot->contents + h->got.offset); rel.r_info = ELF32_R_INFO (h->dynindx, R_386_GLOB_DAT); diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 5ffede1..5b9d420 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -4455,7 +4455,7 @@ bfd_m68k_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info, free (internal_relocs); return TRUE; -error_return: + error_return: if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (internal_relocs != NULL diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index 784c32e..9670213 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -2493,7 +2493,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, return TRUE; -error_return: + error_return: if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (contents != NULL diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 2eaf012..6d3c1c3 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -4281,7 +4281,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) eh->dyn_relocs = NULL; -keep:; + keep:; } /* Finally, allocate space. */ @@ -5827,7 +5827,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, case R_NDS32_SDA15S0_RELA: case R_NDS32_SDA15S0: align = 0x0; -handle_sda: + handle_sda: BFD_ASSERT (sec != NULL); /* If the symbol is in the abs section, the out_bfd will be null. @@ -6155,7 +6155,7 @@ handle_sda: break; } -check_reloc: + check_reloc: if (r != bfd_reloc_ok) { @@ -6204,7 +6204,7 @@ check_reloc: errmsg = _("internal error: unknown error"); /* Fall through. */ -common_error: + common_error: (*info->callbacks->warning) (info, errmsg, name, input_bfd, input_section, offset); break; @@ -6488,7 +6488,7 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) goto get_vma; case DT_JMPREL: s = ehtab->srelplt->output_section; -get_vma: + get_vma: BFD_ASSERT (s != NULL); dyn.d_un.d_ptr = s->vma; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); @@ -8281,7 +8281,7 @@ nds32_convert_32_to_16 (bfd *abfd, uint32_t insn, uint16_t *pinsn16, goto done; } -done: + done: /* Bit-15 of insn16 should be set for a valid instruction. */ if ((insn16 & 0x8000) == 0) return 0; @@ -8603,7 +8603,7 @@ nds32_convert_16_to_32 (bfd *abfd, uint16_t insn16, uint32_t *pinsn) goto done; } -done: + done: if (insn & 0x80000000) return 0; @@ -9448,7 +9448,7 @@ nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, if (p < endp) *p |= 0x80; } -done_adjust_diff: + done_adjust_diff: if (sec == sect) { @@ -12567,7 +12567,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, clean_nds32_elf_blank (); } -finish: + finish: if (internal_relocs != NULL && elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); @@ -12581,7 +12581,7 @@ finish: return result; -error_return: + error_return: result = FALSE; goto finish; } @@ -13152,7 +13152,7 @@ nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, goto error_return; } -finish: + finish: if (relax_blank_list) { nds32_elf_relax_delete_blanks (abfd, sec, relax_blank_list); @@ -13160,7 +13160,7 @@ finish: } return result; -error_return: + error_return: result = FALSE; goto finish; } @@ -13291,7 +13291,7 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, free (reloc_vector); return data; -error_return: + error_return: free (reloc_vector); return NULL; } @@ -14018,7 +14018,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, asection *insec, bfd_byte *incontents, #endif } -finish: + finish: if (incontents) contents = NULL; @@ -14047,7 +14047,7 @@ finish: return result; -error_return: + error_return: result = FALSE; goto finish; } diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c index fd05fb0..17e97bc 100644 --- a/bfd/elf32-nios2.c +++ b/bfd/elf32-nios2.c @@ -3062,7 +3062,7 @@ nios2_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp, struct bfd_link_info *info) h = bfd_hash_lookup (&info->hash->table, "_gp", FALSE, FALSE); lh = (struct bfd_link_hash_entry *) h; -lookup: + lookup: if (lh) { switch (lh->type) diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c index fdb28e7..e9063f6 100644 --- a/bfd/elf32-pru.c +++ b/bfd/elf32-pru.c @@ -1529,7 +1529,7 @@ pru_elf32_relax_section (bfd * abfd, asection * sec, return TRUE; -error_return: + error_return: if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (contents != NULL diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 58927d6..5e31e73 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -7839,7 +7839,7 @@ compute_text_actions (bfd *abfd, print_action_list (stderr, &relax_info->action_list); #endif -error_return: + error_return: release_contents (sec, contents); release_internal_relocs (sec, internal_relocs); if (prop_table) @@ -8844,7 +8844,7 @@ compute_removed_literals (bfd *abfd, print_action_list (stderr, &relax_info->action_list); #endif /* DEBUG */ -error_return: + error_return: if (prop_table) free (prop_table); free_section_cache (&target_sec_cache); diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index bdb038b..636d789 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -1674,7 +1674,7 @@ get_dyn_sym_info (struct elf64_ia64_link_hash_table *ia64_info, *size_p = size; *info_p = info; -has_space: + has_space: /* Append the new one to the array. */ dyn_i = info + count; memset (dyn_i, 0, sizeof (*dyn_i)); @@ -3284,7 +3284,7 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) { if (max_short_vma - min_short_vma >= 0x400000) { -overflow: + overflow: _bfd_error_handler /* xgettext:c-format */ (_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"), @@ -4848,7 +4848,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) /* Extract IDENT. */ if (!bfd_malloc_and_get_section (abfd, s, &dynbuf)) { -error_free_dyn: + error_free_dyn: free (dynbuf); goto error_return; } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 7776d0e..90e2702 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1662,7 +1662,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, if (no_overflow) return TRUE; -convert: + convert: if (opcode == 0xff) { /* We have "call/jmp *foo@GOTPCREL(%rip)". */ @@ -1787,7 +1787,7 @@ convert: overflow when sign-extending imm32 to imm64. */ r_type = (rex & REX_W) != 0 ? R_X86_64_32S : R_X86_64_32; -rewrite_modrm_rex: + rewrite_modrm_rex: bfd_put_8 (abfd, modrm, contents + roff - 1); if (rex) @@ -2179,7 +2179,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_X86_64_PC32_BND: case R_X86_64_PC64: case R_X86_64_64: -pointer: + pointer: if (eh != NULL && (sec->flags & SEC_CODE) != 0) eh->zero_undefweak |= 0x2; /* We are called after all symbols have been resolved. Only @@ -2244,7 +2244,7 @@ pointer: } size_reloc = FALSE; -do_size: + do_size: if (NEED_DYNAMIC_RELOCATION_P (info, TRUE, h, sec, r_type, htab->pointer_r_type)) { @@ -2351,7 +2351,7 @@ do_size: return TRUE; -error_return: + error_return: if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); sec->check_relocs_failed = 1; @@ -2678,7 +2678,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, switch (r_type) { default: -bad_ifunc_reloc: + bad_ifunc_reloc: if (h->root.root.string) name = h->root.root.string; else @@ -2702,7 +2702,7 @@ bad_ifunc_reloc: goto do_relocation; /* FALLTHROUGH */ case R_X86_64_64: -do_ifunc_pointer: + do_ifunc_pointer: if (rel->r_addend != 0) { if (h->root.root.string) @@ -2788,7 +2788,7 @@ do_ifunc_pointer: } } -skip_ifunc: + skip_ifunc: resolved_to_zero = (eh != NULL && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh)); @@ -3047,7 +3047,7 @@ skip_ifunc: break; } -use_plt: + use_plt: if (h->plt.offset != (bfd_vma) -1) { if (htab->plt_second != NULL) @@ -3162,7 +3162,7 @@ use_plt: /* FIXME: The ABI says the linker should make sure the value is the same when it's zeroextended to 64 bit. */ -direct: + direct: if ((input_section->flags & SEC_ALLOC) == 0) break; @@ -3373,7 +3373,7 @@ direct: if (roff < 3 || (roff - 3 + 22) > input_section->size) { -corrupt_input: + corrupt_input: info->callbacks->einfo (_("%F%P: corrupt input: %pB\n"), input_bfd); @@ -4031,12 +4031,12 @@ corrupt_input: } } -do_relocation: + do_relocation: r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, rel->r_addend); -check_relocation_error: + check_relocation_error: if (r != bfd_reloc_ok) { const char *name; @@ -4459,7 +4459,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, else { BFD_ASSERT((h->got.offset & 1) == 0); -do_glob_dat: + do_glob_dat: bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgot->contents + h->got.offset); rela.r_info = htab->r_info (h->dynindx, R_X86_64_GLOB_DAT); diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 1b2d68a..b67ea8c 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1398,7 +1398,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) free (isymbuf); return symcount; -error_return: + error_return: if (xverbuf != NULL) free (xverbuf); if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf) diff --git a/bfd/elfcore.h b/bfd/elfcore.h index eaf40f2..591ca53 100644 --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -316,9 +316,9 @@ elf_core_file_p (bfd *abfd) abfd->start_address = i_ehdrp->e_entry; return abfd->xvec; -wrong: + wrong: bfd_set_error (bfd_error_wrong_format); -fail: + fail: return NULL; } @@ -419,8 +419,8 @@ NAME(_bfd_elf, core_find_build_id) build-id was found. */ goto fail; -wrong: + wrong: bfd_set_error (bfd_error_wrong_format); -fail: + fail: return FALSE; } diff --git a/bfd/elflink.c b/bfd/elflink.c index 6f03c5c..c04712a 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2039,7 +2039,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, /* We also need to define an indirection from the nondefault version of the symbol. */ -nondefault: + nondefault: len = strlen (name); shortname = (char *) bfd_hash_allocate (&info->hash->table, len); if (shortname == NULL) @@ -4089,7 +4089,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (!bfd_malloc_and_get_section (abfd, s, &dynbuf)) { -error_free_dyn: + error_free_dyn: free (dynbuf); goto error_return; } @@ -8209,7 +8209,7 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, result = TRUE; -done: + done: if (symtable1) free (symtable1); if (symtable2) @@ -11745,7 +11745,7 @@ elf_output_implib (bfd *abfd, struct bfd_link_info *info) ret = TRUE; -free_sym_buf: + free_sym_buf: free (sympp); return ret; } diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 2191b5d..35dd8ab 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -4615,7 +4615,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, return TRUE; -error_ret_free_local: + error_ret_free_local: return FALSE; } @@ -5507,7 +5507,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, switch (bfd_r_type) { default: -bad_ifunc_reloc: + bad_ifunc_reloc: if (h->root.root.string) name = h->root.root.string; else @@ -9482,7 +9482,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd, } else { -do_glob_dat: + do_glob_dat: BFD_ASSERT ((h->got.offset & 1) == 0); bfd_put_NN (output_bfd, (bfd_vma) 0, htab->root.sgot->contents + h->got.offset); diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index 559889d..1df2aa8 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -1914,7 +1914,7 @@ get_dyn_sym_info (struct elfNN_ia64_link_hash_table *ia64_info, *size_p = size; *info_p = info; -has_space: + has_space: /* Append the new one to the array. */ dyn_i = info + count; memset (dyn_i, 0, sizeof (*dyn_i)); @@ -3706,7 +3706,7 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) { if (max_short_vma - min_short_vma >= 0x400000) { -overflow: + overflow: _bfd_error_handler /* xgettext:c-format */ (_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"), @@ -4476,7 +4476,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, case bfd_reloc_outofrange: case bfd_reloc_overflow: default: -missing_tls_sec: + missing_tls_sec: { const char *name; diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index d639501..8fcb106 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -2396,7 +2396,7 @@ riscv_elf_relocate_section (bfd *output_bfd, } ret = riscv_resolve_pcrel_lo_relocs (&pcrel_relocs); -out: + out: riscv_free_pcrel_relocs (&pcrel_relocs); return ret; } @@ -3245,7 +3245,7 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return TRUE; -fail: + fail: bfd_set_error (bfd_error_bad_value); return FALSE; } @@ -4219,7 +4219,7 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, ret = TRUE; -fail: + fail: if (relocs != data->relocs) free (relocs); riscv_free_pcgp_relocs(&pcgp_relocs, abfd, sec); diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 81af3ef..ae33acb 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -13385,7 +13385,7 @@ _bfd_elf_mips_get_relocated_section_contents free (reloc_vector); return data; -error_return: + error_return: if (reloc_vector != NULL) free (reloc_vector); return NULL; diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 510e77c..d2bb366 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -4139,7 +4139,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, if (r == bfd_reloc_continue) { -do_relocation: + do_relocation: r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, rel->r_addend); diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index 988e557..2e0e01e 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -2347,7 +2347,7 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd, /* PLT entries with R_386_TLS_DESC relocations are skipped. */ if (n == 0) { -bad_return: + bad_return: count = -1; } else @@ -2626,7 +2626,7 @@ _bfd_x86_elf_link_setup_gnu_properties if (!bfd_set_section_alignment (sec, class_align)) { -error_alignment: + error_alignment: info->callbacks->einfo (_("%F%pA: failed to align section\n"), sec); } diff --git a/bfd/i386lynx.c b/bfd/i386lynx.c index a4d7cd3..8cffd24 100644 --- a/bfd/i386lynx.c +++ b/bfd/i386lynx.c @@ -399,7 +399,7 @@ NAME(lynx,slurp_reloc_table) (bfd *abfd, bfd_set_error (bfd_error_invalid_operation); return FALSE; -doit: + doit: if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0) return FALSE; each_size = obj_reloc_entry_size (abfd); diff --git a/bfd/merge.c b/bfd/merge.c index 2ed1ef5..5a4e709 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -549,7 +549,7 @@ record_section (struct sec_merge_info *sinfo, return TRUE; -error_return: + error_return: for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) *secinfo->psecinfo = NULL; return FALSE; diff --git a/bfd/pdp11.c b/bfd/pdp11.c index 50d006f..35d45e6 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -1632,7 +1632,7 @@ NAME (aout, write_syms) (bfd *abfd) return TRUE; -error_return: + error_return: _bfd_stringtab_free (strtab); return FALSE; } diff --git a/bfd/plugin.c b/bfd/plugin.c index c79468f..72e55a0 100644 --- a/bfd/plugin.c +++ b/bfd/plugin.c @@ -725,7 +725,7 @@ try_load_plugin (const char *pname, abfd->plugin_format = bfd_plugin_yes; result = 1; -short_circuit: + short_circuit: dlclose (plugin_handle); return result; } diff --git a/bfd/reloc.c b/bfd/reloc.c index dab7d17..c4dec86 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -8474,7 +8474,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, free (reloc_vector); return data; -error_return: + error_return: free (reloc_vector); return NULL; } |