mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-22 08:46:59 +00:00
Recognize EM_RISCV in e_machine_to_string
Check that EM_RISCV is defined in elf.h and if it is then recognize it in e_machine_to_string, producing "elf-riscv". * configure.ac: Defining HAVE_EM_RISCV_MACRO if EM_RISCV is defined in elf.h. * src/abg-dwarf-reader.cc (e_machine_to_string): Handle EM_RISCV if HAVE_EM_RISCV_MACRO is defined. Signed-off-by: Mark Wielaard <mark@klomp.org>
This commit is contained in:
parent
f16e4631c1
commit
cdd1113632
12
configure.ac
12
configure.ac
@ -947,6 +947,18 @@ if test x$HAS_EM_TILEGX = xyes; then
|
||||
[Defined to 1 if elf.h has EM_TILEGX macro defined])
|
||||
fi
|
||||
|
||||
HAS_EM_RISCV=no
|
||||
AC_CHECK_DECL([EM_RISCV],
|
||||
[HAS_EM_RISCV=yes],
|
||||
[HAS_EM_RISCV=no],
|
||||
[[#include <elf.h>]])
|
||||
|
||||
if test x$HAS_EM_RISCV = xyes; then
|
||||
AC_DEFINE([HAVE_EM_RISCV_MACRO],
|
||||
1,
|
||||
[Defined to 1 if elf.h has EM_RISCV macro defined])
|
||||
fi
|
||||
|
||||
HAS_R_AARCH64_ABS64=no
|
||||
AC_CHECK_DECL([R_AARCH64_ABS64],
|
||||
[HAS_R_AARCH64_ABS64=yes],
|
||||
|
@ -287,6 +287,11 @@ e_machine_to_string(GElf_Half e_machine)
|
||||
return "elf-tilera-tilegx";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EM_RISCV_MACRO
|
||||
case EM_RISCV:
|
||||
return "elf-riscv";
|
||||
#endif
|
||||
|
||||
case EM_NUM:
|
||||
return "elf-last-arch-number";
|
||||
case EM_ALPHA:
|
||||
|
Loading…
Reference in New Issue
Block a user