summaryrefslogtreecommitdiff
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
authorTaylor Simpson <tsimpson@quicinc.com>2021-02-07 23:46:20 -0600
committerRichard Henderson <richard.henderson@linaro.org>2021-02-18 07:48:22 -0800
commitd2a56bd242de92961c7804f9dabac2d27139d16a (patch)
tree664b5c24bde4e60f3842f2668bb284a63204edcf /linux-user/elfload.c
parent8b453a2b2b2d12ebd0ae315d1308ed39ac412319 (diff)
downloadqemu-d2a56bd242de92961c7804f9dabac2d27139d16a.zip
Hexagon (linux-user/hexagon) Linux user emulation
Implementation of Linux user emulation for Hexagon Some common files modified in addition to new files in linux-user/hexagon Acked-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <1612763186-18161-31-git-send-email-tsimpson@quicinc.com> [rth: Fix termbits.h on review by Laurent] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 73d750c809..bab4237e90 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1514,6 +1514,22 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
#endif /* TARGET_XTENSA */
+#ifdef TARGET_HEXAGON
+
+#define ELF_START_MMAP 0x20000000
+
+#define ELF_CLASS ELFCLASS32
+#define ELF_ARCH EM_HEXAGON
+
+static inline void init_thread(struct target_pt_regs *regs,
+ struct image_info *infop)
+{
+ regs->sepc = infop->entry;
+ regs->sp = infop->start_stack;
+}
+
+#endif /* TARGET_HEXAGON */
+
#ifndef ELF_PLATFORM
#define ELF_PLATFORM (NULL)
#endif