{
/* If this is a dynamic link, we should have created a
_DYNAMIC_LINK symbol or _DYNAMIC_LINKING(for normal mips) symbol
- in in _bfd_mips_elf_create_dynamic_sections.
+ in _bfd_mips_elf_create_dynamic_sections.
Otherwise, we should define the symbol with a value of 0.
FIXME: It should probably get into the symbol table
somehow as well. */
bfd_boolean ok = FALSE;
bfd_vma opcode = x >> 16;
bfd_vma jalx_opcode = 0;
+ bfd_vma sign_bit = 0;
bfd_vma addr;
bfd_vma dest;
{
ok = opcode == 0x4060;
jalx_opcode = 0x3c;
+ sign_bit = 0x10000;
value <<= 1;
}
else if (r_type == R_MIPS_PC16 || r_type == R_MIPS_GNU_REL16_S2)
{
ok = opcode == 0x411;
jalx_opcode = 0x1d;
+ sign_bit = 0x20000;
value <<= 2;
}
+ input_section->output_offset
+ relocation->r_offset
+ 4);
- dest = addr + (((value & 0x3ffff) ^ 0x20000) - 0x20000);
+ dest = (addr
+ + (((value & ((sign_bit << 1) - 1)) ^ sign_bit) - sign_bit));
if ((addr >> 28) << 28 != (dest >> 28) << 28)
{
case E_MIPS_MACH_XLR:
return bfd_mach_mips_xlr;
+ case E_MIPS_MACH_IAMR2:
+ return bfd_mach_mips_interaptiv_mr2;
+
default:
switch (flags & EF_MIPS_ARCH)
{
{
asym->section = section;
/* MIPS_TEXT is a bit special, the address is not an offset
- to the base of the .text section. So substract the section
+ to the base of the .text section. So subtract the section
base address to make it an offset. */
asym->value -= section->vma;
}
{
asym->section = section;
/* MIPS_DATA is a bit special, the address is not an offset
- to the base of the .data section. So substract the section
+ to the base of the .data section. So subtract the section
base address to make it an offset. */
asym->value -= section->vma;
}
did so. */
unsigned int
-_bfd_mips_elf_eh_frame_address_size (bfd *abfd, asection *sec)
+_bfd_mips_elf_eh_frame_address_size (bfd *abfd, const asection *sec)
{
if (elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64)
return 8;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Warning: bad `%s' option size %u smaller than its header"),
+ (_("%B: Warning: bad `%s' option size %u smaller than"
+ " its header"),
abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
break;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Warning: bad `%s' option size %u smaller than its header"),
+ (_("%B: Warning: bad `%s' option size %u smaller than"
+ " its header"),
abfd, MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size);
break;
}
extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
bed = get_elf_backend_data (abfd);
- rel_end = relocs + sec->reloc_count * bed->s->int_rels_per_ext_rel;
+ rel_end = relocs + sec->reloc_count;
/* Check for the mips16 stub sections. */
/* PR15323, ref flags aren't set for references in the
same object. */
- h->root.non_ir_ref = 1;
+ h->root.non_ir_ref_regular = 1;
}
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: GOT reloc at 0x%lx not expected in executables"),
- abfd, (unsigned long) rel->r_offset);
+ (_("%B: GOT reloc at %#Lx not expected in executables"),
+ abfd, rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: CALL16 reloc at 0x%lx not against global symbol"),
- abfd, (unsigned long) rel->r_offset);
+ (_("%B: CALL16 reloc at %#Lx not against global symbol"),
+ abfd, rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, FALSE);
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
+ (_("%B: relocation %s against `%s' can not be used"
+ " when making a shared object; recompile with -fPIC"),
abfd, howto->name,
(h) ? h->root.root.string : "a local symbol");
bfd_set_error (bfd_error_bad_value);
const Elf_Internal_Rela *relend;
bfd_vma addend = 0;
bfd_boolean use_saved_addend_p = FALSE;
- const struct elf_backend_data *bed;
- bed = get_elf_backend_data (output_bfd);
- relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
+ relend = relocs + input_section->reloc_count;
for (rel = relocs; rel < relend; ++rel)
{
const char *name;
sec);
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"),
- input_bfd, input_section, name, howto->name,
- rel->r_offset);
+ (_("%B: Can't find matching LO16 reloc against `%s'"
+ " for %s at %#Lx in section `%A'"),
+ input_bfd, name,
+ howto->name, rel->r_offset, input_section);
}
}
else
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%A' offset of %ld from `%A' "
+ (_("%B: `%A' offset of %Ld from `%A' "
"beyond the range of ADDIUPC"),
output_bfd,
htab->root.sgotplt->output_section,
- htab->root.splt->output_section,
- (long) gotpc_offset);
+ gotpc_offset,
+ htab->root.splt->output_section);
bfd_set_error (bfd_error_no_error);
return FALSE;
}
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"),
+ (_("%B: `%A' offset of %Ld from `%A' beyond the range of ADDIUPC"),
output_bfd,
htab->root.sgotplt->output_section,
- htab->root.splt->output_section,
- (long) gotpc_offset);
+ gotpc_offset,
+ htab->root.splt->output_section);
bfd_set_error (bfd_error_no_error);
return FALSE;
}
val = E_MIPS_ARCH_2;
break;
+ case bfd_mach_mips4010:
+ val = E_MIPS_ARCH_2 | E_MIPS_MACH_4010;
+ break;
+
case bfd_mach_mips4000:
case bfd_mach_mips4300:
case bfd_mach_mips4400:
val = E_MIPS_ARCH_3;
break;
- case bfd_mach_mips4010:
- val = E_MIPS_ARCH_3 | E_MIPS_MACH_4010;
- break;
-
case bfd_mach_mips4100:
val = E_MIPS_ARCH_3 | E_MIPS_MACH_4100;
break;
val = E_MIPS_ARCH_32R2;
break;
+ case bfd_mach_mips_interaptiv_mr2:
+ val = E_MIPS_ARCH_32R2 | E_MIPS_MACH_IAMR2;
+ break;
+
case bfd_mach_mipsisa64r2:
case bfd_mach_mipsisa64r3:
case bfd_mach_mipsisa64r5:
{ bfd_mach_mips4400, bfd_mach_mips4000 },
{ bfd_mach_mips4300, bfd_mach_mips4000 },
{ bfd_mach_mips4100, bfd_mach_mips4000 },
- { bfd_mach_mips4010, bfd_mach_mips4000 },
{ bfd_mach_mips5900, bfd_mach_mips4000 },
+ /* MIPS32r3 extensions. */
+ { bfd_mach_mips_interaptiv_mr2, bfd_mach_mipsisa32r3 },
+
+ /* MIPS32r2 extensions. */
+ { bfd_mach_mipsisa32r3, bfd_mach_mipsisa32r2 },
+
/* MIPS32 extensions. */
{ bfd_mach_mipsisa32r2, bfd_mach_mipsisa32 },
/* MIPS II extensions. */
{ bfd_mach_mips4000, bfd_mach_mips6000 },
{ bfd_mach_mipsisa32, bfd_mach_mips6000 },
+ { bfd_mach_mips4010, bfd_mach_mips6000 },
/* MIPS I extensions. */
{ bfd_mach_mips6000, bfd_mach_mips3000 },
case bfd_mach_mips_octeon3: return AFL_EXT_OCTEON3;
case bfd_mach_mips_octeon2: return AFL_EXT_OCTEON2;
case bfd_mach_mips_xlr: return AFL_EXT_XLR;
+ case bfd_mach_mips_interaptiv_mr2:
+ return AFL_EXT_INTERAPTIV_MR2;
default: return 0;
}
}
scRData, scSData, scSBss, scBss
};
- /* Sort the dynamic symbols so that those with GOT entries come after
- those without. */
htab = mips_elf_hash_table (info);
BFD_ASSERT (htab != NULL);
+ /* Sort the dynamic symbols so that those with GOT entries come after
+ those without. */
if (!mips_elf_sort_hash_table (abfd, info))
return FALSE;
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%s: illegal section name `%s'"),
- bfd_get_filename (abfd), o->name);
+ (_("%B: illegal section name `%A'"), abfd, o);
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
}
{
/* xgettext:c-format */
_bfd_error_handler
- (_("%B: uses different e_flags (0x%lx) fields than previous modules "
- "(0x%lx)"),
- ibfd, (unsigned long) new_flags,
- (unsigned long) old_flags);
+ (_("%B: uses different e_flags (%#x) fields than previous modules "
+ "(%#x)"),
+ ibfd, new_flags, old_flags);
ok = FALSE;
}
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses unknown floating point ABI %d"),
- obfd, abi_fp_bfd, ibfd, out_fp, in_fp);
+ obfd, out_fp, abi_fp_bfd, ibfd, in_fp);
else if (!out_string)
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses %s"),
- obfd, abi_fp_bfd, ibfd, out_fp, in_string);
+ obfd, out_fp, abi_fp_bfd, ibfd, in_string);
else if (!in_string)
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: %B uses %s (set by %B), "
"%B uses unknown floating point ABI %d"),
- obfd, abi_fp_bfd, ibfd, out_string, in_fp);
+ obfd, out_string, abi_fp_bfd, ibfd, in_fp);
else
{
/* If one of the bfds is soft-float, the other must be
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: %B uses %s (set by %B), %B uses %s"),
- obfd, abi_fp_bfd, ibfd, out_string, in_string);
+ obfd, out_string, abi_fp_bfd, ibfd, in_string);
}
}
}
/* xgettext:c-format */
(_("Warning: %B uses %s (set by %B), "
"%B uses unknown MSA ABI %d"),
- obfd, abi_msa_bfd, ibfd,
- "-mmsa", in_attr[Tag_GNU_MIPS_ABI_MSA].i);
+ obfd, "-mmsa", abi_msa_bfd,
+ ibfd, in_attr[Tag_GNU_MIPS_ABI_MSA].i);
break;
default:
/* xgettext:c-format */
(_("Warning: %B uses unknown MSA ABI %d "
"(set by %B), %B uses %s"),
- obfd, abi_msa_bfd, ibfd,
- out_attr[Tag_GNU_MIPS_ABI_MSA].i, "-mmsa");
+ obfd, out_attr[Tag_GNU_MIPS_ABI_MSA].i,
+ abi_msa_bfd, ibfd, "-mmsa");
break;
default:
/* xgettext:c-format */
(_("Warning: %B uses unknown MSA ABI %d "
"(set by %B), %B uses unknown MSA ABI %d"),
- obfd, abi_msa_bfd, ibfd,
- out_attr[Tag_GNU_MIPS_ABI_MSA].i,
- in_attr[Tag_GNU_MIPS_ABI_MSA].i);
+ obfd, out_attr[Tag_GNU_MIPS_ABI_MSA].i,
+ abi_msa_bfd, ibfd, in_attr[Tag_GNU_MIPS_ABI_MSA].i);
break;
}
}
_bfd_error_handler
(_("%B: warning: Unexpected flag in the flags2 field of "
".MIPS.abiflags (0x%lx)"), ibfd,
- (unsigned long) in_abiflags.flags2);
+ in_abiflags.flags2);
}
else
{
fputs ("\n\tMICROMIPS ASE", file);
if (mask & AFL_ASE_XPA)
fputs ("\n\tXPA ASE", file);
+ if (mask & AFL_ASE_MIPS16E2)
+ fputs ("\n\tMIPS16e2 ASE", file);
if (mask == 0)
fprintf (file, "\n\t%s", _("None"));
else if ((mask & ~AFL_ASE_MASK) != 0)
case AFL_EXT_LOONGSON_2F:
fputs ("ST Microelectronics Loongson 2F", file);
break;
+ case AFL_EXT_INTERAPTIV_MR2:
+ fputs ("Imagination interAptiv MR2", file);
+ break;
default:
fprintf (file, "%s (%d)", _("Unknown"), isa_ext);
break;