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/bpf_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/bpf_init.c')
-rw-r--r-- | backends/bpf_init.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/backends/bpf_init.c b/backends/bpf_init.c index a046e069..d407d378 100644 --- a/backends/bpf_init.c +++ b/backends/bpf_init.c @@ -49,7 +49,6 @@ bpf_init (Elf *elf __attribute__ ((unused)), return NULL; /* We handle it. */ - eh->name = "BPF"; bpf_init_reloc (eh); HOOK (eh, register_info); HOOK (eh, disasm); |