+2014-12-03 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17531
+ * readelf.c (get_machine_flags): Replace call to abort with a
+ warning message and a return value.
+ (get_elf_section_flags): Likewise.
+ (get_symbol_visibility): Likewise.
+ (get_ia64_symbol_other): Likewise.
+ (get_ia64_symbol_other): Likewise.
+ (is_32bit_abs_reloc): Likewise.
+ (apply_relocations): Likewise.
+ (display_arm_attribute): Likewise.
+
2014-12-02 Denis Chertykov <chertykov@gmail.com>
* MAINTAINERS: Fix my email address.
strcat (buf, ", abort");
break;
default:
- abort ();
+ warn (_("Unrecognised IA64 VMS Command Code: %x\n"),
+ e_flags & EF_IA_64_VMS_COMCOD);
+ strcat (buf, ", <unknown>");
}
}
break;
if (p != buff + field_size + 4)
{
if (size < (10 + 2))
- abort ();
+ {
+ warn (_("Internal error: not enough buffer room for section flag info"));
+ return _("<unknown>");
+ }
size -= 2;
*p++ = ',';
*p++ = ' ';
if (p != buff + field_size + 4)
{
if (size < (2 + 1))
- abort ();
+ {
+ warn (_("Internal error: not enough buffer room for section flag info"));
+ return _("<unknown>");
+ }
size -= 2;
*p++ = ',';
*p++ = ' ';
if (p != buff + field_size + 4)
{
if (size < (2 + 1))
- abort ();
+ {
+ warn (_("Internal error: not enough buffer room for section flag info"));
+ return _("<unknown>");
+ }
size -= 2;
*p++ = ',';
*p++ = ' ';
if (p != buff + field_size + 4)
{
if (size < (2 + 1))
- abort ();
+ {
+ warn (_("Internal error: not enough buffer room for section flag info"));
+ return _("<unknown>");
+ }
size -= 2;
*p++ = ',';
*p++ = ' ';
case STV_INTERNAL: return "INTERNAL";
case STV_HIDDEN: return "HIDDEN";
case STV_PROTECTED: return "PROTECTED";
- default: abort ();
+ default:
+ error (_("Unrecognized visibility value: %u"), visibility);
+ return _("<unknown>");
}
}
strcat (res, " RSV");
break;
default:
- abort ();
+ warn (_("Unrecognized IA64 VMS ST Function type: %d\n"),
+ VMS_ST_FUNC_TYPE (other));
+ strcat (res, " <unknown>");
+ break;
}
break;
default:
strcat (res, " LNK");
break;
default:
- abort ();
+ warn (_("Unrecognized IA64 VMS ST Linkage: %d\n"),
+ VMS_ST_LINKAGE (other));
+ strcat (res, " <unknown>");
+ break;
}
if (res[0] != 0)
case EM_XTENSA:
return reloc_type == 1; /* R_XTENSA_32. */
default:
- error (_("Missing knowledge of 32-bit reloc types used in DWARF sections of machine number %d\n"),
- elf_header.e_machine);
- abort ();
+ {
+ static unsigned int prev_warn = 0;
+
+ /* Avoid repeating the same warning multiple times. */
+ if (prev_warn != elf_header.e_machine)
+ error (_("Missing knowledge of 32-bit reloc types used in DWARF sections of machine number %d\n"),
+ elf_header.e_machine);
+ prev_warn = elf_header.e_machine;
+ return FALSE;
+ }
}
}
reloc_size = 2;
else
{
- warn (_("unable to apply unsupported reloc type %d to section %s\n"),
- reloc_type, printable_section_name (section));
+ static unsigned int prev_reloc = 0;
+ if (reloc_type != prev_reloc)
+ warn (_("unable to apply unsupported reloc type %d to section %s\n"),
+ reloc_type, printable_section_name (section));
+ prev_reloc = reloc_type;
continue;
}
break;
default:
- abort ();
+ printf (_("<unknown: %d>\n"), tag);
+ break;
}
return p;