diff options
author | Mark Wielaard <mark@klomp.org> | 2019-06-28 19:21:59 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2019-07-10 14:08:33 +0200 |
commit | b3233914074cb7eb19ea2fc3c70257679f867f68 (patch) | |
tree | aad365893d911393052714723f050388197170d7 /backends/sh_init.c | |
parent | 31c8b3f098b0654db8f573b2a15d5b6d07d4d3b0 (diff) | |
download | elfutils-b3233914074cb7eb19ea2fc3c70257679f867f68.tar.gz |
libdwelf: Add dwelf_elf_e_machine_string and use it in readelf.
To print eh human readable description of the ELF e_machine header field
we used the ebl name. But this is not set for most EM constants. Introduce
a new function dwelf_elf_e_machine_string that does work for all known
EM values. Use that in eu-readelf to print a string representation of the
e_machine value.
Since this was the only usage of ebl->name, remove that from struct ebl.
Also add a testcase that makes sure dwelf_elf_e_machine_string works for
all EM values in the libelf/elf.h header so we will immediately notice
when a new value appears.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'backends/sh_init.c')
-rw-r--r-- | backends/sh_init.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/backends/sh_init.c b/backends/sh_init.c index 5526aca1..24f4d4a4 100644 --- a/backends/sh_init.c +++ b/backends/sh_init.c @@ -50,7 +50,6 @@ sh_init (Elf *elf __attribute__ ((unused)), return NULL; /* We handle it. */ - eh->name = "Hitachi SH"; sh_init_reloc (eh); HOOK (eh, reloc_simple_type); HOOK (eh, gotpc_reloc_check); |