Arm Ehdr flag printing
authorUlrich Drepper <drepper@redhat.com>
Wed, 1 Jun 2022 11:14:27 +0000 (13:14 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 6 Jun 2022 11:33:32 +0000 (13:33 +0200)
commit1daec75e0ff5313eec93b60f54fcb5ddc9d2ad28
treec1c5e1eecc56c164179f00cf5c8876c68ea3561f
parentc1e2bff661d7b31ca507e5a69d7dd877e9f47c7f
Arm Ehdr flag printing

Arm needs to decode flags and I modeled it after the binutils code.
The same messages are printed.  Given the requirement of the interface
and the ABIs the current version of the callback function isn't
sufficient unless one wants to create a stateful interface.  The
problem is that most flags need to be interpreted in the context of
the ABI version.  So I changed the API to also pass the original flag
value.  This shouldn't be a problem because there are no users yet.

There is also a bug in ebl_machine_flag_name. When copying the string
provided by the callback cp is moved past the NUL byte.  It should
move to the NUL byte.  Otherwise one cannot anything but the first
added flag description.  Finally some cosmetic changes (space after
each comma in the output).

Signed-off-by: Mark Wielaard <mark@klomp.org>
12 files changed:
backends/ChangeLog
backends/Makefile.am
backends/arm_init.c
backends/arm_machineflagname.c [new file with mode: 0644]
libebl/ChangeLog
libebl/ebl-hooks.h
libebl/eblmachineflagname.c
libebl/eblopenbackend.c
tests/ChangeLog
tests/Makefile.am
tests/run-readelf-arm-flags.sh [new file with mode: 0755]
tests/testfile-arm-flags.bz2 [new file with mode: 0755]