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 /libdw | |
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 'libdw')
-rw-r--r-- | libdw/ChangeLog | 5 | ||||
-rw-r--r-- | libdw/libdw.map | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 4760f9de..6b779e77 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,8 @@ +2019-06-28 Mark Wielaard <mark@klomp.org> + + * libdw.map (ELFUTILS_0.177): New section. Add + dwelf_elf_e_machine_string. + 2019-05-16 Mark Wielaard <mark@klomp.org> * dwarf.h: Add DW_AT_GNU_numerator, DW_AT_GNU_denominator and diff --git a/libdw/libdw.map b/libdw/libdw.map index 55482d58..2e1c0e9e 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -360,4 +360,9 @@ ELFUTILS_0.173 { ELFUTILS_0.175 { global: dwelf_elf_begin; -} ELFUTILS_0.173;
\ No newline at end of file +} ELFUTILS_0.173; + +ELFUTILS_0.177 { + global: + dwelf_elf_e_machine_string; +} ELFUTILS_0.175; |