public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Arm Ehdr flag printing
@ 2022-06-01 14:31 Mark Wielaard
  2022-06-06 11:35 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2022-06-01 14:31 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Ulrich Drepper, Mark Wielaard

From: Ulrich Drepper <drepper@redhat.com>

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>
---

Code is by Ulrich, I just added a quick testcase.

 backends/ChangeLog             |   6 ++
 backends/Makefile.am           |   3 +-
 backends/arm_init.c            |   1 +
 backends/arm_machineflagname.c | 156 +++++++++++++++++++++++++++++++++
 libebl/ChangeLog               |  10 +++
 libebl/ebl-hooks.h             |   2 +-
 libebl/eblmachineflagname.c    |  11 ++-
 libebl/eblopenbackend.c        |   5 +-
 tests/ChangeLog                |   7 ++
 tests/Makefile.am              |   2 +
 tests/run-readelf-arm-flags.sh |  30 +++++++
 tests/testfile-arm-flags.bz2   | Bin 0 -> 2593 bytes
 12 files changed, 225 insertions(+), 8 deletions(-)
 create mode 100644 backends/arm_machineflagname.c
 create mode 100755 tests/run-readelf-arm-flags.sh
 create mode 100755 tests/testfile-arm-flags.bz2

diff --git a/backends/ChangeLog b/backends/ChangeLog
index 51959259..495cdde4 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,9 @@
+2022-06-01  Ulrich Drepper  <drepper@redhat.com>
+
+	* Makefile.am (arm_SRCS): Add arm_machineflagname.c.
+	* arm_init.c (arm_init): Hook in arm_machine_flag_name.
+	* arm_machineflagname.c: New file.
+
 2022-02-16  Mark Wielaard  <mark@klomp.org>
 
 	* ppc_initreg.c (ppc_set_initial_registers_tid): Define struct
diff --git a/backends/Makefile.am b/backends/Makefile.am
index 62916c9c..9566377f 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
@@ -56,7 +56,8 @@ alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c alpha_regs.c \
 	     alpha_corenote.c alpha_auxv.c
 
 arm_SRCS = arm_init.c arm_symbol.c arm_regs.c arm_corenote.c \
-	   arm_auxv.c arm_attrs.c arm_retval.c arm_cfi.c arm_initreg.c
+	   arm_auxv.c arm_attrs.c arm_retval.c arm_cfi.c arm_initreg.c \
+	   arm_machineflagname.c
 
 aarch64_SRCS = aarch64_init.c aarch64_regs.c aarch64_symbol.c	\
 	       aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \
diff --git a/backends/arm_init.c b/backends/arm_init.c
index edd53b75..70b75942 100644
--- a/backends/arm_init.c
+++ b/backends/arm_init.c
@@ -59,6 +59,7 @@ arm_init (Elf *elf __attribute__ ((unused)),
   HOOK (eh, check_reloc_target_type);
   HOOK (eh, symbol_type_name);
   HOOK (eh, data_marker_symbol);
+  HOOK (eh, machine_flag_name);
 
   /* We only unwind the core integer registers.  */
   eh->frame_nregs = 16;
diff --git a/backends/arm_machineflagname.c b/backends/arm_machineflagname.c
new file mode 100644
index 00000000..e93092ae
--- /dev/null
+++ b/backends/arm_machineflagname.c
@@ -0,0 +1,156 @@
+/* Arm-specific ELF flag names.
+   Copyright (C) 2022 Red Hat, Inc.
+   This file is part of elfutils.
+
+   This file is free software; you can redistribute it and/or modify
+   it under the terms of either
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version
+
+   or both in parallel, as here.
+
+   elfutils is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define BACKEND arm_
+#include "libebl_CPU.h"
+
+const char *
+arm_machine_flag_name (Elf64_Word orig, Elf64_Word *flagref)
+{
+  unsigned version = EF_ARM_EABI_VERSION (*flagref) >> 24;
+  if (version != 0)
+    {
+      static const char vername[5][14] =
+        {
+	  "Version1 EABI",
+	  "Version2 EABI",
+	  "Version3 EABI",
+	  "Version4 EABI",
+	  "Version5 EABI",
+        };
+      *flagref &= ~((Elf64_Word) EF_ARM_EABIMASK);
+      return vername[version - 1];
+    }
+  switch (EF_ARM_EABI_VERSION (orig))
+    {
+    case EF_ARM_EABI_VER2:
+      if ((*flagref & EF_ARM_DYNSYMSUSESEGIDX) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_DYNSYMSUSESEGIDX);
+	  return "dynamic symbols use segment index";
+	}
+      if ((*flagref & EF_ARM_MAPSYMSFIRST) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_MAPSYMSFIRST);
+	  return "mapping symbols precede others";
+	}
+      FALLTHROUGH;
+    case EF_ARM_EABI_VER1:
+      if ((*flagref & EF_ARM_SYMSARESORTED) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_SYMSARESORTED);
+	  return "sorted symbol tables";
+	}
+      break;
+    case EF_ARM_EABI_VER3:
+      break;
+    case EF_ARM_EABI_VER5:
+      if ((*flagref & EF_ARM_SOFT_FLOAT) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_SOFT_FLOAT);
+	  return "soft-float ABI";
+	}
+      if ((*flagref & EF_ARM_VFP_FLOAT) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_VFP_FLOAT);
+	  return "hard-float ABI";
+	}
+      FALLTHROUGH;
+    case EF_ARM_EABI_VER4:
+      if ((*flagref & EF_ARM_BE8) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_BE8);
+	  return "BE8";
+	}
+      if ((*flagref & EF_ARM_LE8) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_LE8);
+	  return "LE8";
+	}
+      break;
+    case EF_ARM_EABI_UNKNOWN:
+      if ((*flagref & EF_ARM_INTERWORK) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_INTERWORK);
+	  return "interworking enabled";
+	}
+      if ((*flagref & EF_ARM_APCS_26) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_APCS_26);
+	  return "uses APCS/26";
+	}
+      if ((*flagref & EF_ARM_APCS_FLOAT) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_APCS_FLOAT);
+	  return "uses APCS/float";
+	}
+      if ((*flagref & EF_ARM_PIC) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_PIC);
+	  return "position independent";
+	}
+      if ((*flagref & EF_ARM_ALIGN8) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_ALIGN8);
+	  return "8 bit structure alignment";
+	}
+      if ((*flagref & EF_ARM_NEW_ABI) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_NEW_ABI);
+	  return "uses new ABI";
+	}
+      if ((*flagref & EF_ARM_OLD_ABI) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_OLD_ABI);
+	  return "uses old ABI";
+	}
+      if ((*flagref & EF_ARM_SOFT_FLOAT) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_SOFT_FLOAT);
+	  return "software FP";
+	}
+      if ((*flagref & EF_ARM_VFP_FLOAT) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_VFP_FLOAT);
+	  return "VFP";
+	}
+      if ((*flagref & EF_ARM_MAVERICK_FLOAT) != 0)
+	{
+	  *flagref &= ~((Elf64_Word) EF_ARM_MAVERICK_FLOAT);
+	  return "Maverick FP";
+	}
+      break;
+    default:
+      break;
+    }
+  return NULL;
+}
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 2e31e75d..52b9c609 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,13 @@
+2022-06-01  Ulrich Drepper  <drepper@redhat.com>
+
+	* eblopenbackend.c (default_machine_flag_name): Add original flag
+	as first parameter.
+	* ebl-hooks.h (machine_flag_name): Ditto.
+	* eblmachineflagname.c (ebl_machine_flag_name): Modernize, use bool
+	for first.  Pass original flag value to machine_flag_name
+	callback as well.  Add space after comma in printed list.
+	Fix appending strings provided by callback.
+
 2021-12-21  Luca Boccassi  <bluca@debian.org>
 
 	* eblobjnote.c (ebl_object_note): Handle NT_FDO_PACKAGING_METADATA.
diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
index 1214bb84..d6437e53 100644
--- a/libebl/ebl-hooks.h
+++ b/libebl/ebl-hooks.h
@@ -51,7 +51,7 @@ const char *EBLHOOK(section_type_name) (int, char *, size_t);
 const char *EBLHOOK(section_name) (int, int, char *, size_t);
 
 /* Return next machine flag name.  */
-const char *EBLHOOK(machine_flag_name) (GElf_Word *);
+const char *EBLHOOK(machine_flag_name) (GElf_Word, GElf_Word *);
 
 /* Check whether machine flags are valid.  */
 bool EBLHOOK(machine_flag_check) (GElf_Word);
diff --git a/libebl/eblmachineflagname.c b/libebl/eblmachineflagname.c
index 5f440776..02e11c65 100644
--- a/libebl/eblmachineflagname.c
+++ b/libebl/eblmachineflagname.c
@@ -46,8 +46,9 @@ ebl_machine_flag_name (Ebl *ebl, Elf64_Word flags, char *buf, size_t len)
     res = "";
   else
     {
+      Elf64_Word orig_flags = flags;
       char *cp = buf;
-      int first = 1;
+      bool first = true;
       const char *machstr;
       size_t machstrlen;
 
@@ -55,12 +56,13 @@ ebl_machine_flag_name (Ebl *ebl, Elf64_Word flags, char *buf, size_t len)
 	{
 	  if (! first)
 	    {
-	      if (cp + 1 >= buf + len)
+	      if (cp + 2 >= buf + len)
 		break;
 	      *cp++ = ',';
+	      *cp++ = ' ';
 	    }
 
-	  machstr = ebl != NULL ? ebl->machine_flag_name (&flags) : NULL;
+	  machstr = ebl != NULL ? ebl->machine_flag_name (orig_flags, &flags) : NULL;
 	  if (machstr == NULL)
 	    {
 	      /* No more known flag.  */
@@ -76,8 +78,9 @@ ebl_machine_flag_name (Ebl *ebl, Elf64_Word flags, char *buf, size_t len)
 	    }
 
 	  cp = mempcpy (cp, machstr, machstrlen);
+	  --cp;
 
-	  first = 0;
+	  first = false;
 	}
       while (flags != 0);
 
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 0c07296c..c6657252 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -169,7 +169,7 @@ static const char *default_section_type_name (int ignore, char *buf,
 					      size_t len);
 static const char *default_section_name (int ignore, int ignore2, char *buf,
 					 size_t len);
-static const char *default_machine_flag_name (Elf64_Word *ignore);
+static const char *default_machine_flag_name (Elf64_Word orig, Elf64_Word *ignore);
 static bool default_machine_flag_check (Elf64_Word flags);
 static bool default_machine_section_flag_check (GElf_Xword flags);
 static const char *default_symbol_type_name (int ignore, char *buf,
@@ -450,7 +450,8 @@ default_section_name (int ignore __attribute__ ((unused)),
 }
 
 static const char *
-default_machine_flag_name (Elf64_Word *ignore __attribute__ ((unused)))
+default_machine_flag_name (Elf64_Word orig __attribute__ ((unused)),
+			   Elf64_Word *ignore __attribute__ ((unused)))
 {
   return NULL;
 }
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 44b8df88..eec32171 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,10 @@
+2022-06-01  Mark Wielaard  <mark@klomp.org>
+
+	* testfile-arm-flags.bz2: New test file.
+	* run-readelf-arm-flags.sh: New test.
+	* Makefile.am (TESTS): Add run-readelf-arm-flags.sh.
+	(EXTRA_DIST): Add readelf-arm-flags.sh and testfile-arm-flags.bz2
+
 2022-04-24  Mark Wielaard  <mark@klomp.org>
 
 	* run-debuginfod-webapi-concurrency.sh: Fix PR number in xfail.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 84c3950a..3b6aacd9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -164,6 +164,7 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
 	run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \
 	run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
 	run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \
+	run-readelf-arm-flags.sh \
 	run-readelf-addr.sh run-readelf-str.sh \
 	run-readelf-multi-noline.sh \
 	run-readelf-types.sh \
@@ -343,6 +344,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
 	     run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
 	     testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
 	     testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
+	     run-readelf-arm-flags.sh testfile-arm-flags.bz2 \
 	     run-readelf-addr.sh run-readelf-str.sh \
 	     run-readelf-multi-noline.sh testfile_multi_noline.bz2 \
 	     run-readelf-types.sh \
diff --git a/tests/run-readelf-arm-flags.sh b/tests/run-readelf-arm-flags.sh
new file mode 100755
index 00000000..25c5477d
--- /dev/null
+++ b/tests/run-readelf-arm-flags.sh
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+. $srcdir/test-subr.sh
+
+# echo "int main () {}" | gcc -xc -o testfile-arm-flags -
+testfiles testfile-arm-flags
+
+testrun_compare ${abs_top_builddir}/src/readelf -h testfile-arm-flags <<\EOF
+ELF Header:
+  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
+  Class:                             ELF32
+  Data:                              2's complement, little endian
+  Ident Version:                     1 (current)
+  OS/ABI:                            UNIX - System V
+  ABI Version:                       0
+  Type:                              DYN (Shared object file)
+  Machine:                           ARM
+  Version:                           1 (current)
+  Entry point address:               0x3d1
+  Start of program headers:          52 (bytes into file)
+  Start of section headers:          6920 (bytes into file)
+  Flags:                             Version5 EABI, hard-float ABI
+  Size of this header:               52 (bytes)
+  Size of program header entries:    32 (bytes)
+  Number of program headers entries: 9
+  Size of section header entries:    40 (bytes)
+  Number of section headers entries: 29
+  Section header string table index: 28
+
+EOF
diff --git a/tests/testfile-arm-flags.bz2 b/tests/testfile-arm-flags.bz2
new file mode 100755
index 0000000000000000000000000000000000000000..d1b018adc504256350248641c45b03981f16cee6
GIT binary patch
literal 2593
zcmV++3f}cXT4*^jL0KkKS$e_71po;tfB*mg|Ns8y{n!8h|M&m@|NHsm_}9&duP@Kv
zY{&Zi<K5s0_gkpk0P7~(7_yJMd&d9)0}Tk10%~MrdQD8DM~ZDU^o^v_dq|$3Jx@?G
z(4p!WntLT4rqnP%8Zri-q@I&cB=VXDntF_l0QDMrk0+%K4^K(y5J@0`28{w~7|{vn
znGG}m9-~2!&>DK0Gyn#MfuLvr00000XaE2J009sQq%w@qlL@p48hT7d&=U!!jWlQg
zGH5htG#MBG1Pq!6MnfU$02vJiMnD)Q0h&;diK8i#H8fzDBTS7M4FQnQ05s6hGy#wR
z01W^D000000000205s4t8Z<NjGy_crAY?QE8UO*4Kmf=CCYc&&$k1p20MG*v(WaP9
z3=kqk000btXaEf~Gy$VQpa1|eG62v6AOJKCGynhq00E|e4FDRL7YSyNCF0zb*&GFX
z&Q)Nl?d)t6-k$u{s=b2l3L_LwmFGn2mOPa)aiYO{ak;FJmKKzNCS~>WAl4O}5avT8
zWdaO_p%KvKZC|33H&1^iM%B4*RyF=shK_H4*k;|errX(YL#-3gZ+g{=WCF@D@^&2j
z_Py#HOm^~J|23=RoIn65AXKvmS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L
z&w-a3(+-#*UBoZDMT%<}QDKT+sA4F`O|lxrGrio#LR8L3%*wMhtSa&#5e$(vxnmew
zz9~3-n`H5}@)p5ep2l27%hgi9cvkA2&P`n^j7X&?pPj<BH-{0seydElsbG}!g`}uf
zO+aYp(&GyZ^fc=XU6+KeI(Y{>4Z>Q^ie(#WFhmkCks|gd5ahSGrn13~KKSeftAxd(
z2&BMQ$1AH8X<RQgjN_57ZXR8XH7lW|Y%0j2@tSg6DLL*I5yPCu2RRWQn1u~6<&PxL
z7{djCD<Hy*8YyeoAojD1K{lGm<{6N{#URD}RRMTv3$8_bmS?H1l2pW`EI*fkIAKQg
zq}hq{NRwvPB$l`v$k+;f_ME$Ha&g2BfwHc>sMW{|sKDkJ+0)u<9&4dyfMZPvElzw?
zYe5S2XxW0lIzVFYDFC=eFi*HKvhvaR={rdPTMoRtc<?BU$U1RNz6pe;d6hdB)+^0!
z+IOyc7{E7H%fj!5@d<~xfdLP21BhTnc}gkq1(JqNqDm-f0fEcDbwaimVUeW4#pat!
z0bphUafy6XyR!+W=IKI_r_;84!=;7RE-O^O3+ix-3^IdMb2Z2;i~_td41tcAqffHD
zVU0n?=PVGwJ%%sMHcc*5F`E1J3<$uwrVR)swj5<gW_cl}I$V>f4Doj)Q-ui!tQ=ra
D3=yAi

literal 0
HcmV?d00001

-- 
2.18.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Arm Ehdr flag printing
  2022-06-01 14:31 [PATCH] Arm Ehdr flag printing Mark Wielaard
@ 2022-06-06 11:35 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2022-06-06 11:35 UTC (permalink / raw)
  To: elfutils-devel

On Wed, 2022-06-01 at 16:31 +0200, Mark Wielaard wrote:
> From: Ulrich Drepper <drepper@redhat.com>
> 
> 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).

Pushed.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-06 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 14:31 [PATCH] Arm Ehdr flag printing Mark Wielaard
2022-06-06 11:35 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).