+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
return TRUE;
-error_return:
+ error_return:
_bfd_stringtab_free (strtab);
return FALSE;
}
|| (*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,
|| (*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,
return TRUE;
-release_symdefs:
+ release_symdefs:
bfd_release (abfd, (ardata)->symdefs);
return FALSE;
}
return TRUE;
-release_symdefs:
+ release_symdefs:
bfd_release (abfd, ardata->symdefs);
return FALSE;
}
{
_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
);
{
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;
{
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;
{
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
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);
ext->x_sym.x_misc.x_lnsz.x_size);
}
-end:
+ end:
return bfd_coff_auxesz (abfd);
}
\f
}
close (f);
}
-stub_end:
+ stub_end:
/* There was something wrong above, so use now the standard builtin
stub. */
if (coff_data (abfd)->go32stub == NULL)
|| 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;
|| 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;
return seq->last_line->address - seq->low_pc;
}
-fail:
+ fail:
*filename_ptr = NULL;
return 0;
}
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;
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);
(_("warning: %pB: unsupported GNU_PROPERTY_TYPE (%ld) type: 0x%x"),
abfd, note->type, type);
-next:
+ next:
ptr += (datasz + (align_size - 1)) & ~ (align_size - 1);
}
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. */
}
}
-alloc_failure:
+ alloc_failure:
if (array)
free (array);
return copy_elf_program_header (ibfd, obfd);
}
-rewrite:
+ rewrite:
if (ibfd->xvec == obfd->xvec)
{
/* When rewriting program header, set the output maxpagesize to
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;
ret = FALSE;
}
-free_sym_buf:
+ free_sym_buf:
free (sympp);
return ret;
}
return TRUE;
-error_return:
+ error_return:
if (contents != NULL
&& elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
return TRUE;
-error_return:
+ error_return:
if (contents != NULL
&& elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
return TRUE;
-error_return:
+ error_return:
if (contents != NULL
&& elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
free (internal_relocs);
return TRUE;
-error_return:
+ error_return:
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (internal_relocs != NULL
free (internal_relocs);
return TRUE;
-error_return:
+ error_return:
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (internal_relocs != NULL
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;
}
return TRUE;
-error_ret_free_local:
+ error_ret_free_local:
return FALSE;
}
&& 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)
{
|| h->root.type == bfd_link_hash_defweak)
&& local_ref))
{
-convert_load:
+ convert_load:
if (opcode == 0x8b)
{
if (to_reloc_32)
case R_386_GOTOFF:
case R_386_GOTPC:
-create_got:
+ create_got:
if (r_type != R_386_TLS_IE)
{
if (eh != NULL)
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. */
}
size_reloc = FALSE;
-do_size:
+ do_size:
if (NEED_DYNAMIC_RELOCATION_P (info, FALSE, h, sec, r_type,
R_386_32))
{
return TRUE;
-error_return:
+ error_return:
if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
sec->check_relocs_failed = 1;
switch (r_type)
{
default:
-bad_ifunc_reloc:
+ bad_ifunc_reloc:
if (h->root.root.string)
name = h->root.root.string;
else
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,
}
}
-skip_ifunc:
+ skip_ifunc:
resolved_to_zero = (eh != NULL
&& UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh));
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);
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;
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);
free (internal_relocs);
return TRUE;
-error_return:
+ error_return:
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (internal_relocs != NULL
return TRUE;
-error_return:
+ error_return:
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (contents != NULL
eh->dyn_relocs = NULL;
-keep:;
+ keep:;
}
/* Finally, allocate space. */
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.
break;
}
-check_reloc:
+ check_reloc:
if (r != bfd_reloc_ok)
{
errmsg = _("internal error: unknown error");
/* Fall through. */
-common_error:
+ common_error:
(*info->callbacks->warning) (info, errmsg, name, input_bfd,
input_section, offset);
break;
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);
goto done;
}
-done:
+ done:
/* Bit-15 of insn16 should be set for a valid instruction. */
if ((insn16 & 0x8000) == 0)
return 0;
goto done;
}
-done:
+ done:
if (insn & 0x80000000)
return 0;
if (p < endp)
*p |= 0x80;
}
-done_adjust_diff:
+ done_adjust_diff:
if (sec == sect)
{
clean_nds32_elf_blank ();
}
-finish:
+ finish:
if (internal_relocs != NULL
&& elf_section_data (sec)->relocs != internal_relocs)
free (internal_relocs);
return result;
-error_return:
+ error_return:
result = FALSE;
goto finish;
}
goto error_return;
}
-finish:
+ finish:
if (relax_blank_list)
{
nds32_elf_relax_delete_blanks (abfd, sec, relax_blank_list);
}
return result;
-error_return:
+ error_return:
result = FALSE;
goto finish;
}
free (reloc_vector);
return data;
-error_return:
+ error_return:
free (reloc_vector);
return NULL;
}
#endif
}
-finish:
+ finish:
if (incontents)
contents = NULL;
return result;
-error_return:
+ error_return:
result = FALSE;
goto finish;
}
h = bfd_hash_lookup (&info->hash->table, "_gp", FALSE, FALSE);
lh = (struct bfd_link_hash_entry *) h;
-lookup:
+ lookup:
if (lh)
{
switch (lh->type)
return TRUE;
-error_return:
+ error_return:
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (contents != NULL
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)
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);
*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));
{
if (max_short_vma - min_short_vma >= 0x400000)
{
-overflow:
+ overflow:
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
/* Extract IDENT. */
if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
{
-error_free_dyn:
+ error_free_dyn:
free (dynbuf);
goto error_return;
}
if (no_overflow)
return TRUE;
-convert:
+ convert:
if (opcode == 0xff)
{
/* We have "call/jmp *foo@GOTPCREL(%rip)". */
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)
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
}
size_reloc = FALSE;
-do_size:
+ do_size:
if (NEED_DYNAMIC_RELOCATION_P (info, TRUE, h, sec, r_type,
htab->pointer_r_type))
{
return TRUE;
-error_return:
+ error_return:
if (elf_section_data (sec)->this_hdr.contents != contents)
free (contents);
sec->check_relocs_failed = 1;
switch (r_type)
{
default:
-bad_ifunc_reloc:
+ bad_ifunc_reloc:
if (h->root.root.string)
name = h->root.root.string;
else
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)
}
}
-skip_ifunc:
+ skip_ifunc:
resolved_to_zero = (eh != NULL
&& UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh));
break;
}
-use_plt:
+ use_plt:
if (h->plt.offset != (bfd_vma) -1)
{
if (htab->plt_second != NULL)
/* 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;
if (roff < 3
|| (roff - 3 + 22) > input_section->size)
{
-corrupt_input:
+ corrupt_input:
info->callbacks->einfo
(_("%F%P: corrupt input: %pB\n"),
input_bfd);
}
}
-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;
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);
free (isymbuf);
return symcount;
-error_return:
+ error_return:
if (xverbuf != NULL)
free (xverbuf);
if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf)
abfd->start_address = i_ehdrp->e_entry;
return abfd->xvec;
-wrong:
+ wrong:
bfd_set_error (bfd_error_wrong_format);
-fail:
+ fail:
return NULL;
}
build-id was found. */
goto fail;
-wrong:
+ wrong:
bfd_set_error (bfd_error_wrong_format);
-fail:
+ fail:
return FALSE;
}
/* 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)
if (!bfd_malloc_and_get_section (abfd, s, &dynbuf))
{
-error_free_dyn:
+ error_free_dyn:
free (dynbuf);
goto error_return;
}
result = TRUE;
-done:
+ done:
if (symtable1)
free (symtable1);
if (symtable2)
ret = TRUE;
-free_sym_buf:
+ free_sym_buf:
free (sympp);
return ret;
}
return TRUE;
-error_ret_free_local:
+ error_ret_free_local:
return FALSE;
}
switch (bfd_r_type)
{
default:
-bad_ifunc_reloc:
+ bad_ifunc_reloc:
if (h->root.root.string)
name = h->root.root.string;
else
}
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);
*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));
{
if (max_short_vma - min_short_vma >= 0x400000)
{
-overflow:
+ overflow:
_bfd_error_handler
/* xgettext:c-format */
(_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"),
case bfd_reloc_outofrange:
case bfd_reloc_overflow:
default:
-missing_tls_sec:
+ missing_tls_sec:
{
const char *name;
}
ret = riscv_resolve_pcrel_lo_relocs (&pcrel_relocs);
-out:
+ out:
riscv_free_pcrel_relocs (&pcrel_relocs);
return ret;
}
return TRUE;
-fail:
+ fail:
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
ret = TRUE;
-fail:
+ fail:
if (relocs != data->relocs)
free (relocs);
riscv_free_pcgp_relocs(&pcgp_relocs, abfd, sec);
free (reloc_vector);
return data;
-error_return:
+ error_return:
if (reloc_vector != NULL)
free (reloc_vector);
return NULL;
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);
/* PLT entries with R_386_TLS_DESC relocations are skipped. */
if (n == 0)
{
-bad_return:
+ bad_return:
count = -1;
}
else
if (!bfd_set_section_alignment (sec, class_align))
{
-error_alignment:
+ error_alignment:
info->callbacks->einfo (_("%F%pA: failed to align section\n"),
sec);
}
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);
return TRUE;
-error_return:
+ error_return:
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
*secinfo->psecinfo = NULL;
return FALSE;
return TRUE;
-error_return:
+ error_return:
_bfd_stringtab_free (strtab);
return FALSE;
}
abfd->plugin_format = bfd_plugin_yes;
result = 1;
-short_circuit:
+ short_circuit:
dlclose (plugin_handle);
return result;
}
free (reloc_vector);
return data;
-error_return:
+ error_return:
free (reloc_vector);
return NULL;
}
+2020-02-26 Alan Modra <amodra@gmail.com>
+
+ * elfedit.c: Indent labels correctly.
+ * readelf.c: Likewise.
+ * resres.c: Likewise.
+
2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/25584
}
}
-out:
+ out:
if (ret != 0)
error (_("%s: Invalid PT_NOTE segment\n"), file_name);
printf ("%02x ", ptr[j] & 0xff);
printf (">");
-next:
+ next:
ptr += ((datasz + (size - 1)) & ~ (size - 1));
if (ptr == ptr_end)
break;
return;
-skip_err:
+ skip_err:
fprintf (stderr, "%s: %s: Not a valid WIN32 resource file\n", program_name,
filename);
xexit (1);
+2020-02-26 Alan Modra <amodra@gmail.com>
+
+ * config/obj-elf.c: Indent labels correctly.
+ * config/obj-macho.c: Likewise.
+ * config/tc-aarch64.c: Likewise.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-cr16.c: Likewise.
+ * config/tc-crx.c: Likewise.
+ * config/tc-frv.c: Likewise.
+ * config/tc-i386-intel.c: Likewise.
+ * config/tc-i386.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-mn10200.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/tc-nds32.c: Likewise.
+ * config/tc-riscv.c: Likewise.
+ * config/tc-s12z.c: Likewise.
+ * config/tc-xtensa.c: Likewise.
+ * config/tc-z80.c: Likewise.
+ * read.c: Likewise.
+ * symbols.c: Likewise.
+ * write.c: Likewise.
+
2020-02-20 Nelson Chu <nelson.chu@sifive.com>
* config/tc-riscv.c (riscv_ip): New boolean insn_with_csr to indicate
}
}
-done:
+ done:
demand_empty_rest_of_line ();
obj_elf_change_section (name, type, attr, entsize, &match, linkonce,
demand_empty_rest_of_line ();
return tag;
-bad_string:
+ bad_string:
as_bad (_("bad string constant"));
ignore_rest_of_line ();
return 0;
-bad:
+ bad:
as_bad (_("expected <tag> , <value>"));
ignore_rest_of_line ();
return 0;
S_CLEAR_EXTERNAL (sym);
}
-done:
+ done:
/* switch back to the section that was current before the .zerofill. */
subseg_set (old_seg, 0);
}
return FALSE;
}
-elt_size:
+ elt_size:
switch (TOLOWER (*ptr))
{
case 'b':
*ccp = str;
return TRUE;
-invalid_fp:
+ invalid_fp:
set_fatal_syntax_error (_("invalid floating-point constant"));
return FALSE;
}
return offset;
}
-vectype_conversion_fail:
+ vectype_conversion_fail:
first_error (_("bad vector arrangement type"));
return AARCH64_OPND_QLF_NIL;
}
case AARCH64_OPND_SYSREG_TLBI:
inst.base.operands[i].sysins_op =
parse_sys_ins_reg (&str, aarch64_sys_regs_tlbi_hsh);
-sys_reg_ins:
+ sys_reg_ins:
if (inst.base.operands[i].sysins_op == NULL)
{
set_fatal_syntax_error ( _("unknown or missing operation name"));
inst.base.operands[i].present = 1;
continue;
-failure:
+ failure:
/* The parse routine should already have set the error, but in case
not, set a default one here. */
if (! error_p ())
(_("unexpected characters following instruction"));
}
-parse_operands_return:
+ parse_operands_return:
if (error_p ())
{
break;
}
-apply_fix_return:
+ apply_fix_return:
/* Free the allocated the struct aarch64_inst.
N.B. currently there are very limited number of fix-up types actually use
this field, so the impact on the performance should be minimal . */
}
}
-fini:
+ fini:
if (saw_comma)
goto err;
input_line_pointer = old_input_line_pointer;
return ntok - (end_tok - tok);
-err:
+ err:
#ifdef RELOC_OP_P
is_end_of_line[(unsigned char) '!'] = 0;
#endif
return TOKENIZE_ERROR;
#ifdef RELOC_OP_P
-err_report:
+ err_report:
is_end_of_line[(unsigned char) '!'] = 0;
#endif
input_line_pointer = old_input_line_pointer;
}
as_warn (_("Unknown CPU identifier `%s'"), name);
-found:
+ found:
(void) restore_line_pointer (ch);
demand_empty_rest_of_line ();
}
goto done;
}
-write_done:
+ write_done:
md_number_to_chars (fixpos, image, 4);
-done:
+ done:
fixP->fx_done = 1;
}
}
as_warn (_("frame reg expected, using $%d."), framereg);
-found:
+ found:
note_gpreg (framereg);
return framereg;
}
}
return;
-error:
+ error:
ignore_rest_of_line ();
}
op = 0xc700 | mask;
add_unwind_opcode (op, 2);
return;
-error:
+ error:
ignore_rest_of_line ();
}
as_warn (_("float16 format cannot be set more than once, ignoring."));
}
-cleanup:
+ cleanup:
*input_line_pointer = saved_char;
ignore_rest_of_line ();
}
goto unsupported_psr;
p += 4;
-check_suffix:
+ check_suffix:
if (*p == '_')
{
/* A suffix follows. */
return;
-neon_vmul:
+ neon_vmul:
inst.instruction = N_MNEM_vmul;
inst.cond = 0xb;
if (thumb_mode)
| ((elno & 0x1) << 3));
}
-bad_scalar:
+ bad_scalar:
first_error (_("scalar out of range for multiply instruction"));
return 0;
}
if (p_ver_ret == NULL)
return -1;
-found:
+ found:
/* Tag_CPU_arch_profile. */
if (ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v7a)
|| ARM_CPU_HAS_FEATURE (p_ver_ret->flags, arm_ext_v8)
match = 1;
break;
-/* Try again with next instruction. */
-next_insn:
+ /* Try again with next instruction. */
+ next_insn:
instruction++;
}
cur_arg->type = arg_c;
goto set_params;
-/* Parse an operand according to its type. */
-set_params:
+ /* Parse an operand according to its type. */
+ set_params:
cur_arg->constant = 0;
set_operand (operand, crx_ins);
}
match = 1;
break;
-/* Try again with next instruction. */
-next_insn:
+ /* Try again with next instruction. */
+ next_insn:
instruction++;
}
as_bad (_("Maximum %d bits may be set in `mask16' operand"),
MAX_REGS_IN_MASK16);
-next_inst:
+ next_inst:
while (!ISALNUM (*paramP) && *paramP != '}')
paramP++;
}
vliw1 = vliw_chain_top;
-workaround_top:
+ workaround_top:
FRV_SET_VLIW_WINDOW (vliw1, vliw2, vliw3);
/* FALLTHROUGH */
default:
-fallthrough:
+ fallthrough:
if (e->X_add_symbol
&& !i386_intel_simplify_symbol (e->X_add_symbol))
return 0;
if (!t->opcode_modifier.d)
{
-mismatch:
+ mismatch:
if (!match)
i.error = operand_size_mismatch;
return match;
if (given.bitfield.baseindex == overlap.bitfield.baseindex)
return 1;
-mismatch:
+ mismatch:
i.error = operand_type_mismatch;
return 0;
}
if (!current_templates)
{
-check_suffix:
+ check_suffix:
if (mnem_p > mnemonic)
{
/* See if we can get a match by trimming off a suffix. */
if (!t->opcode_modifier.d)
continue;
-check_reverse:
+ check_reverse:
if (!(size_match & MATCH_REVERSE))
continue;
/* Try reversing direction of operands. */
}
else
{
-duplicate:
+ duplicate:
i.operands++;
i.reg_operands++;
i.tm.operands++;
else
return 1;
-bad_address:
+ bad_address:
as_bad (_("`%s' is not a valid %s expression"),
operand_string, kind);
return 0;
{
as_fatal (_("inserting \"%s\" into %s name hash table failed: %s"),
alias, kind, error_string);
-out:
+ out:
obstack_free (¬es, name);
obstack_free (¬es, alias);
}
break;
}
-keep_going:
+ keep_going:
str = input_line_pointer;
input_line_pointer = hold;
break;
}
-keep_going:
+ keep_going:
str = input_line_pointer;
input_line_pointer = hold;
}
++s;
} while (s[0] != '\0');
-end:
+ end:
/* Put the origin line for debugging. */
argv[argc] = line;
opcode->proc (argc, argv, opcode->pseudo_val);
relax_hint_begin = 0;
name = nds_itoa (relax_hint_id_current);
-reordered_id:
+ reordered_id:
/* Find relax hint entry for next instruction, and all member will be
initialized at that time. */
pattern_now = pattern_now->next;
}
-restore:
+ restore:
now_seg = seg_bak;
frchain_now = frchain_bak;
}
|| imm_expr->X_add_number >= 64)
break;
ip->insn_opcode |= ENCODE_RVC_IMM (imm_expr->X_add_number);
-rvc_imm_done:
+ rvc_imm_done:
s = expr_end;
imm_expr->X_op = O_absent;
continue;
p = percent_op_utype;
if (my_getSmallExpression (imm_expr, imm_reloc, s, p))
break;
-rvc_lui:
+ rvc_lui:
if (imm_expr->X_op != O_constant
|| imm_expr->X_add_number <= 0
|| imm_expr->X_add_number >= RISCV_BIGIMM_REACH
goto alu_op;
case '0': /* AMO "displacement," which must be zero. */
p = percent_op_null;
-load_store:
+ load_store:
if (riscv_handle_implicit_zero_offset (imm_expr, s))
continue;
-alu_op:
+ alu_op:
/* If this value won't fit into a 16 bit offset, then go
find a macro that will generate the 32 bit offset
code pattern. */
continue;
case 'p': /* PC-relative offset. */
-branch:
+ branch:
*imm_reloc = BFD_RELOC_12_PCREL;
my_getExpression (imm_expr, s);
s = expr_end;
continue;
case 'a': /* 20-bit PC-relative offset. */
-jump:
+ jump:
my_getExpression (imm_expr, s);
s = expr_end;
*imm_reloc = BFD_RELOC_RISCV_JMP;
insn_with_csr = FALSE;
}
-out:
+ out:
/* Restore the character we might have clobbered above. */
if (save_c)
*(argsStart - 1) = save_c;
md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
-jump:
+ jump:
/* Jump to the target. */
fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal,
4, &exp, FALSE, BFD_RELOC_RISCV_JMP);
abort ();
}
-done:
+ done:
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
*v = exp.X_add_number;
return true;
-fail:
+ fail:
fail_line_pointer = input_line_pointer;
input_line_pointer = ilp;
return false;
}
}
-fini:
+ fini:
if (saw_comma || saw_colon)
goto err;
input_line_pointer = old_input_line_pointer;
return num_args;
-err:
+ err:
if (saw_comma)
as_bad (_("extra comma"));
else if (saw_colon)
"first unrecognized character is `%c'"), *p);
}
}
-end:
+ end:
input_line_pointer = old_ptr;
}
as_warn (_("truncated file `%s', %ld of %ld bytes read"),
path, bytes, count);
}
-done:
+ done:
if (binfile != NULL)
fclose (binfile);
if (path)
free (path);
path = filename;
-gotit:
+ gotit:
/* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */
register_dependency (path);
input_scrub_insert_file (path);
if (finalize_syms)
S_SET_VALUE (symp, final_val);
-exit_dont_set_value:
+ exit_dont_set_value:
/* Always set the segment, even if not finalizing the value.
The segment is used to determine whether a symbol is defined. */
S_SET_SEGMENT (symp, final_seg);
#ifdef HANDLE_ALIGN
HANDLE_ALIGN (fragP);
#endif
-skip_align:
+ skip_align:
know (fragP->fr_next != NULL);
fragP->fr_offset = (fragP->fr_next->fr_address
- fragP->fr_address
+2020-02-26 Alan Modra <amodra@gmail.com>
+
+ * emultempl/cskyelf.em: Indent labels correctly.
+ * ldfile.c: Likewise.
+ * ldlang.c: Likewise.
+ * plugin.c: Likewise.
+
2020-02-26 Alan Modra <amodra@gmail.com>
PR 25593
if (hook_in_stub (&info, &os->children.head))
return stub_sec;
-err_ret:
+ err_ret:
einfo (_("%X%P: can not make stub section: %E\n"));
return NULL;
}
}
}
}
-success:
+ success:
#ifdef ENABLE_PLUGINS
/* If plugins are active, they get first chance to claim
any successfully-opened input file. We skip archives
/* Fall through. */
case by_name:
-sort_by_name:
+ sort_by_name:
ret = strcmp (bfd_section_name (asec), bfd_section_name (bsec));
break;
return abfd;
}
}
-report_error:
+ report_error:
einfo (_("%F%P: could not create dummy IR bfd: %E\n"));
return NULL;
}
+2020-02-26 Alan Modra <amodra@gmail.com>
+
+ * aarch64-asm.c: Indent labels correctly.
+ * aarch64-dis.c: Likewise.
+ * aarch64-gen.c: Likewise.
+ * aarch64-opc.c: Likewise.
+ * alpha-dis.c: Likewise.
+ * i386-dis.c: Likewise.
+ * nds32-asm.c: Likewise.
+ * nfp-dis.c: Likewise.
+ * visium-dis.c: Likewise.
+
2020-02-25 Claudiu Zissulescu <claziss@gmail.com>
* arc-regs.h (int_vector_base): Make it available for all ARC
break;
}
-convert_to_real_return:
+ convert_to_real_return:
aarch64_replace_opcode (inst, real);
}
}
-encoding_exit:
+ encoding_exit:
DEBUG_TRACE ("exit with %s", opcode->name);
*code = inst->value;
DEBUG_TRACE ("constraint matching FAIL");
}
-decode_fail:
+ decode_fail:
return FALSE;
}
\f
goto divide_table_1_finish;
}
-divide_table_1_try_again:
+ divide_table_1_try_again:
mask_and = -1;
ent = opcode;
while (ent)
divide_table_1 (bittree->bits[0], list0.next);
divide_table_1 (bittree->bits[1], list1.next);
-divide_table_1_finish:
+ divide_table_1_finish:
if (debug)
printf ("Leave from depth %d\n", depth);
--depth;
}
}
-done:
+ done:
/* Add the new instruction to the sequence. */
memcpy (insn_sequence->current_insns + insn_sequence->next_insn++,
inst, sizeof (aarch64_inst));
return 4;
-found:
+ found:
(*info->fprintf_func) (info->stream, "%s", opcode->name);
if (opcode->operands[0] != 0)
(*info->fprintf_func) (info->stream, "\t");
case 'B':
if (l == 0 && len == 1)
{
-case_B:
+ case_B:
if (intel_syntax)
break;
if (sizeflag & SUFFIX_ALWAYS)
SAVE_LAST (*p);
break;
}
-case_L:
+ case_L:
if (intel_syntax)
break;
if (sizeflag & SUFFIX_ALWAYS)
case 'P':
if (l == 0 && len == 1)
{
-case_P:
+ case_P:
if (intel_syntax)
{
if ((rex & REX_W) == 0
case 'Q':
if (l == 0 && len == 1)
{
-case_Q:
+ case_Q:
if (intel_syntax && !alt)
break;
USED_REX (REX_W);
case 'S':
if (l == 0 && len == 1)
{
-case_S:
+ case_S:
if (intel_syntax)
break;
if (sizeflag & SUFFIX_ALWAYS)
mnemonicendp = p;
*p = '\0';
-skip:
+ skip:
if (modrm.mod == 3)
{
int add;
mnemonicendp = p;
*p = '\0';
-skip:
+ skip:
OP_M (bytemode, sizeflag);
}
break;
}
-skip:
+ skip:
mnemonicendp = p;
*p = '\0';
OP_E (bytemode, sizeflag);
abort ();
}
-done:
+ done:
/* Don't silently discarding bits. */
if (value & __MASK (fld->shift))
{
if (*plex == 0 && (*p == '\0' || *p == '!' || *p == '#'))
return 1;
-reject:
+ reject:
/* If not accepted, try another combination. */
variant++;
}
*s++ = '\0';
dot = strchr (mnemoic, '.');
-retry_dot:
+ retry_dot:
/* Lookup the opcode syntax. */
hash = htab_hash_string (mnemoic);
opc = (struct nds32_opcode *)
/* A matched opcode is found. Write the result to instruction buffer. */
pdesc->result = NASM_OK;
-out:
+ out:
free (str);
}
err = _print_instrs (addr, dinfo, &opts);
-end:
+ end:
if (err != 8)
dinfo->fprintf_func (dinfo->stream, "\t # ERROR");
if (err == _NFP_ERR_CONT)
}
return 0;
-illegal_opcode:
+ illegal_opcode:
return -1;
}
return 0;
-illegal_opcode:
+ illegal_opcode:
return -1;
}
return 0;
-illegal_opcode:
+ illegal_opcode:
return -1;
}
return 0;
-illegal_opcode:
+ illegal_opcode:
return -1;
}