Rather than aborting, use "unknown relative" as the reloc type should
display_elf_relocation_at want to print a relocation. Also fix
another case where readelf doesn't understand the relocation and sets
all_relocations[i].r_name to NULL.
PR 33743
* readelf.c (dump_relr_relocations): Don't abort on unknown
e_machine.
(dump_relocations): Don't assume we can pass NULL to a %s
format.
switch (filedata->file_header.e_machine)
{
default:
- abort ();
+ rtype = "unknown relative";
+ break;
case EM_386:
case EM_IAMCU:
if (do_got_section_contents)
{
all_relocations[i].r_offset = offset;
- all_relocations[i].r_name = rtype;
+ all_relocations[i].r_name = rtype ? rtype : "unknown";
all_relocations[i].r_symbol = symbol_name;
all_relocations[i].r_addend = rels[i].r_addend;
all_relocations[i].r_type = rel_type;