[v2,1/2] Add support for Hexagon

Message ID 5691bbc30845e54df88afa35417fab424adfd235.1712087613.git.quic_mathbern@quicinc.com
State Committed
Headers
Series Add initial support for Hexagon |

Commit Message

Matheus Tavares Bernardino April 2, 2024, 7:55 p.m. UTC
  This implements initial support for the Hexagon architecture. The
Hexagon ABI spec can be seen at
https://lists.llvm.org/pipermail/llvm-dev/attachments/20190916/21516a52/attachment-0001.pdf

A hello_hexagon.ko test is also added.

$ head tests/test-suite.log
  [...]
  # TOTAL: 275
  # PASS:  269
  # SKIP:  6
  # XFAIL: 0
  # FAIL:  0
  # XPASS: 0
  # ERROR: 0

$ cat tests/run-strip-reloc-ko.sh.log
  [...]
  runtest hello_hexagon.ko
  PASS run-strip-reloc-ko.sh (exit status: 0)

Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
---
 backends/Makefile.am        |   7 +-
 backends/hexagon_init.c     |  51 ++++++++++++++
 backends/hexagon_reloc.def  | 130 +++++++++++++++++++++++++++++++++++
 backends/hexagon_symbol.c   |  58 ++++++++++++++++
 libebl/eblopenbackend.c     |   2 +
 libelf/elf-knowledge.h      | 131 ++++++++++++++++++++++++++++++++++++
 src/elflint.c               |   2 +-
 tests/Makefile.am           |   2 +-
 tests/hello_hexagon.ko.bz2  | Bin 0 -> 11184 bytes
 tests/run-strip-reloc-ko.sh |   3 +-
 10 files changed, 381 insertions(+), 5 deletions(-)
 create mode 100644 backends/hexagon_init.c
 create mode 100644 backends/hexagon_reloc.def
 create mode 100644 backends/hexagon_symbol.c
 create mode 100644 tests/hello_hexagon.ko.bz2

index 55fa74db..7bc685e6 100755
  

Comments

Mark Wielaard April 4, 2024, 4:51 p.m. UTC | #1
Hi Matheus,

On Tue, 2024-04-02 at 16:55 -0300, Matheus Tavares Bernardino wrote:
> This implements initial support for the Hexagon architecture. The
> Hexagon ABI spec can be seen at
> https://lists.llvm.org/pipermail/llvm-dev/attachments/20190916/21516a52/attachment-0001.pdf
> 
> A hello_hexagon.ko test is also added.
> 
> $ head tests/test-suite.log
>   [...]
>   # TOTAL: 275
>   # PASS:  269
>   # SKIP:  6
>   # XFAIL: 0
>   # FAIL:  0
>   # XPASS: 0
>   # ERROR: 0
> 
> $ cat tests/run-strip-reloc-ko.sh.log
>   [...]
>   runtest hello_hexagon.ko
>   PASS run-strip-reloc-ko.sh (exit status: 0)

Very nice. Thanks for including the new testcase. Now we have at least
a little test coverage that can be run on any arch to check hexagon is
supported.

The only thing I did before pushing this was to add a ChangeLog entry
to the commit message:

    * backends/Makefile.am (modules): Add hexagon.
    (hexagon_SRCS): New var for hexagon_init.c and hexagon_symbol.c.
    (libebl_backends_a_SOURCES): Add hexagon_SRCS.
    * backends/hexagon_init.c: New file.
    * backends/hexagon_reloc.def: Likewise.
    * backends/hexagon_symbol.c: Likewise.
    * libebl/eblopenbackend.c (hexagon_init): Declare.
    (machines): Add hexagon.
    * libelf/elf-knowledge.h: Add hexagon e_flags values, section
    indices and and relocs.
    * src/elflint.c (valid_e_machine): Add EM_QDSP6.
    * tests/Makefile.am (EXTRA_DIST): Add hello_hexagon.ko.bz2.
    * tests/hello_hexagon.ko.bz2: New test file.
    * tests/run-strip-reloc-ko.sh: Add hello_hexagon.ko.

This is mainly for my own review, so I know all changes were actually
intended.

Pushed,

Mark
  

Patch

diff --git a/backends/Makefile.am b/backends/Makefile.am
index b946fd30..e22b522c 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
@@ -37,7 +37,7 @@  AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
 noinst_LIBRARIES = libebl_backends.a libebl_backends_pic.a
 
 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
-	  m68k bpf riscv csky loongarch arc mips
+	  m68k bpf riscv csky loongarch arc mips hexagon
 
 i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
 	    i386_retval.c i386_regs.c i386_auxv.c \
@@ -104,12 +104,15 @@  arc_SRCS = arc_init.c arc_symbol.c
 
 mips_SRCS = mips_init.c mips_symbol.c
 
+hexagon_SRCS = hexagon_init.c hexagon_symbol.c
+
 libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
 			    $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \
 			    $(aarch64_SRCS) $(sparc_SRCS) $(ppc_SRCS) \
 			    $(ppc64_SRCS) $(s390_SRCS) \
 			    $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS) \
-			    $(loongarch_SRCS) $(arc_SRCS) $(mips_SRCS)
+			    $(loongarch_SRCS) $(arc_SRCS) $(mips_SRCS) \
+			    $(hexagon_SRCS)
 
 libebl_backends_pic_a_SOURCES =
 am_libebl_backends_pic_a_OBJECTS = $(libebl_backends_a_SOURCES:.c=.os)
diff --git a/backends/hexagon_init.c b/backends/hexagon_init.c
new file mode 100644
index 00000000..9c8c6d8d
--- /dev/null
+++ b/backends/hexagon_init.c
@@ -0,0 +1,51 @@ 
+/* Initialization of Hexagon specific backend library.
+   Copyright (C) 2024 Qualcomm Innovation Center, Inc. All Rights Reserved.
+   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         hexagon_
+#define RELOC_PREFIX    R_HEX_
+#include "libebl_CPU.h"
+
+/* This defines the common reloc hooks based on hexagon_reloc.def.  */
+#include "common-reloc.c"
+
+
+Ebl *
+hexagon_init (Elf *elf __attribute__ ((unused)),
+                GElf_Half machine __attribute__ ((unused)),
+                Ebl *eh)
+{
+  hexagon_init_reloc (eh);
+  HOOK (eh, reloc_simple_type);
+
+  return eh;
+}
+
diff --git a/backends/hexagon_reloc.def b/backends/hexagon_reloc.def
new file mode 100644
index 00000000..cd55d374
--- /dev/null
+++ b/backends/hexagon_reloc.def
@@ -0,0 +1,130 @@ 
+/* List the relocation types for Hexagon.  -*- C -*-
+   Copyright (C) 2024 Qualcomm Innovation Center, Inc. All Rights Reserved.
+   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/>.  */
+
+/*          NAME,                     REL|EXEC|DYN */
+
+RELOC_TYPE (NONE,                     0)
+RELOC_TYPE (B22_PCREL,                REL)
+RELOC_TYPE (B15_PCREL,                REL)
+RELOC_TYPE (B7_PCREL,                 REL)
+RELOC_TYPE (LO16,                     REL)
+RELOC_TYPE (HI16,                     REL)
+RELOC_TYPE (32,                       REL)
+RELOC_TYPE (16,                       REL)
+RELOC_TYPE (8,                        REL)
+RELOC_TYPE (GPREL16_0,                REL)
+RELOC_TYPE (GPREL16_1,                REL)
+RELOC_TYPE (GPREL16_2,                REL)
+RELOC_TYPE (GPREL16_3,                REL)
+RELOC_TYPE (HL16,                     REL)
+RELOC_TYPE (B13_PCREL,                REL)
+RELOC_TYPE (B9_PCREL,                 REL)
+RELOC_TYPE (B32_PCREL_X,              REL)
+RELOC_TYPE (32_6_X,                   REL)
+RELOC_TYPE (B22_PCREL_X,              REL)
+RELOC_TYPE (B15_PCREL_X,              REL)
+RELOC_TYPE (B13_PCREL_X,              REL)
+RELOC_TYPE (B9_PCREL_X,               REL)
+RELOC_TYPE (B7_PCREL_X,               REL)
+RELOC_TYPE (16_X,                     REL)
+RELOC_TYPE (12_X,                     REL)
+RELOC_TYPE (11_X,                     REL)
+RELOC_TYPE (10_X,                     REL)
+RELOC_TYPE (9_X,                      REL)
+RELOC_TYPE (8_X,                      REL)
+RELOC_TYPE (7_X,                      REL)
+RELOC_TYPE (6_X,                      REL)
+RELOC_TYPE (32_PCREL,                 REL)
+RELOC_TYPE (COPY,                     REL)
+RELOC_TYPE (GLOB_DAT,                 REL)
+RELOC_TYPE (JMP_SLOT,                 REL)
+RELOC_TYPE (RELATIVE,                 REL)
+RELOC_TYPE (PLT_B22_PCREL,            REL)
+RELOC_TYPE (GOTREL_LO16,              REL)
+RELOC_TYPE (GOTREL_HI16,              REL)
+RELOC_TYPE (GOTREL_32,                REL)
+RELOC_TYPE (GOT_LO16,                 REL)
+RELOC_TYPE (GOT_HI16,                 REL)
+RELOC_TYPE (GOT_32,                   REL)
+RELOC_TYPE (GOT_16,                   REL)
+RELOC_TYPE (DTPMOD_32,                REL)
+RELOC_TYPE (DTPREL_LO16,              REL)
+RELOC_TYPE (DTPREL_HI16,              REL)
+RELOC_TYPE (DTPREL_32,                REL)
+RELOC_TYPE (DTPREL_16,                REL)
+RELOC_TYPE (GD_PLT_B22_PCREL,         REL)
+RELOC_TYPE (GD_GOT_LO16,              REL)
+RELOC_TYPE (GD_GOT_HI16,              REL)
+RELOC_TYPE (GD_GOT_32,                REL)
+RELOC_TYPE (GD_GOT_16,                REL)
+RELOC_TYPE (IE_LO16,                  REL)
+RELOC_TYPE (IE_HI16,                  REL)
+RELOC_TYPE (IE_32,                    REL)
+RELOC_TYPE (IE_GOT_LO16,              REL)
+RELOC_TYPE (IE_GOT_HI16,              REL)
+RELOC_TYPE (IE_GOT_32,                REL)
+RELOC_TYPE (IE_GOT_16,                REL)
+RELOC_TYPE (TPREL_LO16,               REL)
+RELOC_TYPE (TPREL_HI16,               REL)
+RELOC_TYPE (TPREL_32,                 REL)
+RELOC_TYPE (TPREL_16,                 REL)
+RELOC_TYPE (6_PCREL_X,                REL)
+RELOC_TYPE (GOTREL_32_6_X,            REL)
+RELOC_TYPE (GOTREL_16_X,              REL)
+RELOC_TYPE (GOTREL_11_X,              REL)
+RELOC_TYPE (GOT_32_6_X,               REL)
+RELOC_TYPE (GOT_16_X,                 REL)
+RELOC_TYPE (GOT_11_X,                 REL)
+RELOC_TYPE (DTPREL_32_6_X,            REL)
+RELOC_TYPE (DTPREL_16_X,              REL)
+RELOC_TYPE (DTPREL_11_X,              REL)
+RELOC_TYPE (GD_GOT_32_6_X,            REL)
+RELOC_TYPE (GD_GOT_16_X,              REL)
+RELOC_TYPE (GD_GOT_11_X,              REL)
+RELOC_TYPE (IE_32_6_X,                REL)
+RELOC_TYPE (IE_16_X,                  REL)
+RELOC_TYPE (IE_GOT_32_6_X,            REL)
+RELOC_TYPE (IE_GOT_16_X,              REL)
+RELOC_TYPE (IE_GOT_11_X,              REL)
+RELOC_TYPE (TPREL_32_6_X,             REL)
+RELOC_TYPE (TPREL_16_X,               REL)
+RELOC_TYPE (TPREL_11_X,               REL)
+RELOC_TYPE (LD_PLT_B22_PCREL,         REL)
+RELOC_TYPE (LD_GOT_LO16,              REL)
+RELOC_TYPE (LD_GOT_HI16,              REL)
+RELOC_TYPE (LD_GOT_32,                REL)
+RELOC_TYPE (LD_GOT_16,                REL)
+RELOC_TYPE (LD_GOT_32_6_X,            REL)
+RELOC_TYPE (LD_GOT_16_X,              REL)
+RELOC_TYPE (LD_GOT_11_X,              REL)
+RELOC_TYPE (23_REG,                   REL)
+RELOC_TYPE (GD_PLT_B22_PCREL_X,       REL)
+RELOC_TYPE (GD_PLT_B32_PCREL_X,       REL)
+RELOC_TYPE (LD_PLT_B22_PCREL_X,       REL)
+RELOC_TYPE (LD_PLT_B32_PCREL_X,       REL)
+RELOC_TYPE (27_REG,                   REL)
diff --git a/backends/hexagon_symbol.c b/backends/hexagon_symbol.c
new file mode 100644
index 00000000..b341243e
--- /dev/null
+++ b/backends/hexagon_symbol.c
@@ -0,0 +1,58 @@ 
+/* Hexagon specific symbolic name handling.
+   Copyright (C) 2024 Qualcomm Innovation Center, Inc. All Rights Reserved.
+   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
+
+#include <assert.h>
+#include <elf.h>
+#include <stddef.h>
+#include <string.h>
+
+#define BACKEND hexagon_
+#include "libebl_CPU.h"
+
+
+/* Check for the simple reloc types.  */
+Elf_Type
+hexagon_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type,
+                             int *addsub __attribute__ ((unused)))
+{
+  switch (type)
+    {
+    case R_HEX_32:
+      return ELF_T_WORD;
+    case R_HEX_16:
+      return ELF_T_HALF;
+    case R_HEX_8:
+      return ELF_T_BYTE;
+    default:
+      return ELF_T_NUM;
+    }
+}
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index a5f7467a..b68dea7a 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -58,6 +58,7 @@  Ebl *csky_init (Elf *, GElf_Half, Ebl *);
 Ebl *loongarch_init (Elf *, GElf_Half, Ebl *);
 Ebl *arc_init (Elf *, GElf_Half, Ebl *);
 Ebl *mips_init (Elf *, GElf_Half, Ebl *);
+Ebl *hexagon_init (Elf *, GElf_Half, Ebl *);
 
 /* This table should contain the complete list of architectures as far
    as the ELF specification is concerned.  */
@@ -156,6 +157,7 @@  static const struct
   { loongarch_init, "elf_loongarch", "loongarch", 9, EM_LOONGARCH, ELFCLASS64, ELFDATA2LSB },
   { arc_init, "elf_arc", "arc", 3, EM_ARCV2, ELFCLASS32, ELFDATA2LSB },
   { mips_init, "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
+  { hexagon_init, "elf_hexagon", "hexagon", 9, EM_QDSP6, ELFCLASS32, ELFDATA2LSB },
 };
 #define nmachines (sizeof (machines) / sizeof (machines[0]))
 
diff --git a/libelf/elf-knowledge.h b/libelf/elf-knowledge.h
index 6e005fa5..71535934 100644
--- a/libelf/elf-knowledge.h
+++ b/libelf/elf-knowledge.h
@@ -98,4 +98,135 @@ 
 #define GNU_BUILD_ATTRIBUTE_PIC		7
 #define GNU_BUILD_ATTRIBUTE_SHORT_ENUM	8
 
+/* Hexagon specific declarations.  */
+
+/* Processor specific flags for the Ehdr e_flags field.  */
+#define EF_HEXAGON_MACH_V2   0x00000001 /* Hexagon V2 */
+#define EF_HEXAGON_MACH_V3   0x00000002 /* Hexagon V3 */
+#define EF_HEXAGON_MACH_V4   0x00000003 /* Hexagon V4 */
+#define EF_HEXAGON_MACH_V5   0x00000004 /* Hexagon V5 */
+#define EF_HEXAGON_MACH_V55  0x00000005 /* Hexagon V55 */
+#define EF_HEXAGON_MACH_V60  0x00000060 /* Hexagon V60 */
+#define EF_HEXAGON_MACH_V61  0x00000061 /* Hexagon V61 */
+#define EF_HEXAGON_MACH_V62  0x00000062 /* Hexagon V62 */
+#define EF_HEXAGON_MACH_V65  0x00000065 /* Hexagon V65 */
+#define EF_HEXAGON_MACH_V66  0x00000066 /* Hexagon V66 */
+#define EF_HEXAGON_MACH_V67  0x00000067 /* Hexagon V67 */
+#define EF_HEXAGON_MACH_V67T 0x00008067 /* Hexagon V67T */
+#define EF_HEXAGON_MACH_V68  0x00000068 /* Hexagon V68 */
+#define EF_HEXAGON_MACH_V69  0x00000069 /* Hexagon V68 */
+#define EF_HEXAGON_MACH_V71  0x00000071 /* Hexagon V71 */
+#define EF_HEXAGON_MACH_V71T 0x00008071 /* Hexagon V71T */
+#define EF_HEXAGON_MACH_V73  0x00000073 /* Hexagon V73 */
+#define EF_HEXAGON_MACH      0x000003ff /* Hexagon V.. */
+
+/* Special section indices.  */
+#define SHN_HEXAGON_SCOMMON    0xff00 /* Other access sizes */
+#define SHN_HEXAGON_SCOMMON_1  0xff01 /* Byte-sized access */
+#define SHN_HEXAGON_SCOMMON_2  0xff02 /* Half-word-sized access */
+#define SHN_HEXAGON_SCOMMON_4  0xff03 /* Word-sized access */
+#define SHN_HEXAGON_SCOMMON_8  0xff04 /* Double-word-size access */
+
+/* Hexagon specific relocs.  */
+#define R_HEX_NONE                0
+#define R_HEX_B22_PCREL           1
+#define R_HEX_B15_PCREL           2
+#define R_HEX_B7_PCREL            3
+#define R_HEX_LO16                4
+#define R_HEX_HI16                5
+#define R_HEX_32                  6
+#define R_HEX_16                  7
+#define R_HEX_8                   8
+#define R_HEX_GPREL16_0           9
+#define R_HEX_GPREL16_1           10
+#define R_HEX_GPREL16_2           11
+#define R_HEX_GPREL16_3           12
+#define R_HEX_HL16                13
+#define R_HEX_B13_PCREL           14
+#define R_HEX_B9_PCREL            15
+#define R_HEX_B32_PCREL_X         16
+#define R_HEX_32_6_X              17
+#define R_HEX_B22_PCREL_X         18
+#define R_HEX_B15_PCREL_X         19
+#define R_HEX_B13_PCREL_X         20
+#define R_HEX_B9_PCREL_X          21
+#define R_HEX_B7_PCREL_X          22
+#define R_HEX_16_X                23
+#define R_HEX_12_X                24
+#define R_HEX_11_X                25
+#define R_HEX_10_X                26
+#define R_HEX_9_X                 27
+#define R_HEX_8_X                 28
+#define R_HEX_7_X                 29
+#define R_HEX_6_X                 30
+#define R_HEX_32_PCREL            31
+#define R_HEX_COPY                32
+#define R_HEX_GLOB_DAT            33
+#define R_HEX_JMP_SLOT            34
+#define R_HEX_RELATIVE            35
+#define R_HEX_PLT_B22_PCREL       36
+#define R_HEX_GOTREL_LO16         37
+#define R_HEX_GOTREL_HI16         38
+#define R_HEX_GOTREL_32           39
+#define R_HEX_GOT_LO16            40
+#define R_HEX_GOT_HI16            41
+#define R_HEX_GOT_32              42
+#define R_HEX_GOT_16              43
+#define R_HEX_DTPMOD_32           44
+#define R_HEX_DTPREL_LO16         45
+#define R_HEX_DTPREL_HI16         46
+#define R_HEX_DTPREL_32           47
+#define R_HEX_DTPREL_16           48
+#define R_HEX_GD_PLT_B22_PCREL    49
+#define R_HEX_GD_GOT_LO16         50
+#define R_HEX_GD_GOT_HI16         51
+#define R_HEX_GD_GOT_32           52
+#define R_HEX_GD_GOT_16           53
+#define R_HEX_IE_LO16             54
+#define R_HEX_IE_HI16             55
+#define R_HEX_IE_32               56
+#define R_HEX_IE_GOT_LO16         57
+#define R_HEX_IE_GOT_HI16         58
+#define R_HEX_IE_GOT_32           59
+#define R_HEX_IE_GOT_16           60
+#define R_HEX_TPREL_LO16          61
+#define R_HEX_TPREL_HI16          62
+#define R_HEX_TPREL_32            63
+#define R_HEX_TPREL_16            64
+#define R_HEX_6_PCREL_X           65
+#define R_HEX_GOTREL_32_6_X       66
+#define R_HEX_GOTREL_16_X         67
+#define R_HEX_GOTREL_11_X         68
+#define R_HEX_GOT_32_6_X          69
+#define R_HEX_GOT_16_X            70
+#define R_HEX_GOT_11_X            71
+#define R_HEX_DTPREL_32_6_X       72
+#define R_HEX_DTPREL_16_X         73
+#define R_HEX_DTPREL_11_X         74
+#define R_HEX_GD_GOT_32_6_X       75
+#define R_HEX_GD_GOT_16_X         76
+#define R_HEX_GD_GOT_11_X         77
+#define R_HEX_IE_32_6_X           78
+#define R_HEX_IE_16_X             79
+#define R_HEX_IE_GOT_32_6_X       80
+#define R_HEX_IE_GOT_16_X         81
+#define R_HEX_IE_GOT_11_X         82
+#define R_HEX_TPREL_32_6_X        83
+#define R_HEX_TPREL_16_X          84
+#define R_HEX_TPREL_11_X          85
+#define R_HEX_LD_PLT_B22_PCREL    86
+#define R_HEX_LD_GOT_LO16         87
+#define R_HEX_LD_GOT_HI16         88
+#define R_HEX_LD_GOT_32           89
+#define R_HEX_LD_GOT_16           90
+#define R_HEX_LD_GOT_32_6_X       91
+#define R_HEX_LD_GOT_16_X         92
+#define R_HEX_LD_GOT_11_X         93
+#define R_HEX_23_REG              94
+#define R_HEX_GD_PLT_B22_PCREL_X  95
+#define R_HEX_GD_PLT_B32_PCREL_X  96
+#define R_HEX_LD_PLT_B22_PCREL_X  97
+#define R_HEX_LD_PLT_B32_PCREL_X  98
+#define R_HEX_27_REG              99
+
 #endif	/* elf-knowledge.h */
diff --git a/src/elflint.c b/src/elflint.c
index 864de710..e56e1465 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -331,7 +331,7 @@  static const int valid_e_machine[] =
     EM_AVR, EM_FR30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300,
     EM_MN10200, EM_PJ, EM_OPENRISC, EM_ARC_A5, EM_XTENSA, EM_ALPHA,
     EM_TILEGX, EM_TILEPRO, EM_AARCH64, EM_BPF, EM_RISCV, EM_CSKY, EM_LOONGARCH,
-    EM_ARCV2
+    EM_ARCV2, EM_QDSP6
   };
 #define nvalid_e_machine \
   (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 40e0eaa5..b7fb7238 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -320,7 +320,7 @@  EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
 	     hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
 	     hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
 	     hello_m68k.ko.bz2 hello_riscv64.ko.bz2 hello_csky.ko.bz2 \
-	     hello_arc_hs4.ko.bz2 \
+	     hello_arc_hs4.ko.bz2 hello_hexagon.ko.bz2 \
 	     run-unstrip-test.sh run-unstrip-test2.sh \
 	     testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \
 	     testfile-info-link.stripped.bz2 run-unstrip-test3.sh \
diff --git a/tests/hello_hexagon.ko.bz2 b/tests/hello_hexagon.ko.bz2
new file mode 100644
index 0000000000000000000000000000000000000000..e60d2c1bda6e11cc6483f8db5537c36b583a4b5b
GIT binary patch
literal 11184
zcmai4Q*b2;l)SO68{4)sv27bSwlkU7ww)Vul1yydwk9?wnasZZ*zfJCuIjF?KIiv*
z9C3XRKf9P7jfUQn(l0{*%jm!V7yI<vP~P8FThGY%AvNmgn``Oi)zj*`H^YpMk=&=Q
z)T~Rd?Jmpdcm^Gd)WFe<67rO{4P8kIUKbZLV^Be`q5w}(fCrpt5&=H|fWCm9s+f&6
zZp%iasF-89yg^_a%wb9%W=^^2K;OcpG3?8wu{1xQ1)Dmrh^2@{NrO=0KnaL10w6>O
zA*cN%$gvzW53VW#hyujH*p4bI!YZ<sen9}(pkV+2FmHSDpZZ_%AO8<f8j#S^q7()5
z%XS5_!lI56qW_zKo}rd4xyGL&;tBq9e(?a?3y%M)p#Ka6I0zpAkc|>WM<_zaG?n+W
z6)GsTD+uGU%Ps~NInoqFZAMm|;{zi^m+buFA{Mzo6Bqv#harm00P~ixIb0~hq5u$-
zs1yg7!cRq7^(j&9LYNHnSM{&jStw0GMI`{@TCIpD3dG@;UFP@SsH)QC`FTebHE@n4
zNf8GJU`aYr)%GmNF9!uS2Zg{-iNIOi(ofWv43jDt+LpsSr@&DIv|IoshA&KiP`3P6
z?V9dcDEXWxm}`iFCuuWR@+q676eA}hS9YNlYI##84Fs|+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g(uP`De
z9_Xj9K~54QiZe_$*6uLW3X<N=@lM4+=II*#A@S8V(6SztV5xV%r|ik%JTQZQy=lS<
zBgOsZouOX5rWj89DK~Ie!M=SGtQYc0u2m{?5~a+t^IiQX^~!-Oj@4?X)=D{NHNi!g
z&gnk#{iPbUK9Rr1-x2yUnAPxdd)jUq_YzyK8j#eiJ`ab!1F8u-s5fcF7E7tM1k9GM
z$80Rn?rGV{?^E#Syc9C-r&1*xN)y_@Q64Z8PwQn)H_&(mSo~yyB*Q08q%NhFW(uZC
zztJ~&B&Z{kMxTv17CSL#xb@?(#%QW$=hQ1GTa0M6qriKeD}R+7G1Z@It5p1P?@gr<
Lj({e)<=Ou~-H|>u

literal 0
HcmV?d00001

diff --git a/tests/run-strip-reloc-ko.sh b/tests/run-strip-reloc-ko.sh
--- a/tests/run-strip-reloc-ko.sh
+++ b/tests/run-strip-reloc-ko.sh
@@ -4,7 +4,7 @@ 
 
 testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko \
 	hello_aarch64.ko hello_m68k.ko hello_riscv64.ko hello_csky.ko \
-	hello_arc_hs4.ko
+	hello_arc_hs4.ko hello_hexagon.ko
 
 # Most simple hello world kernel module for various architectures.
 # Make sure that it contains debuginfo with CONFIG_DEBUG_INFO=y.
@@ -47,5 +47,6 @@  runtest hello_m68k.ko 1
 runtest hello_riscv64.ko 1
 runtest hello_csky.ko 1
 runtest hello_arc_hs4.ko 1
+runtest hello_hexagon.ko 1
 
 exit $runtest_status