[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/41] Revert "elf: Relax MIPS' elf_check_arch() to accept EM_NANO
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 41/41] Revert "elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too" |
Date: |
Tue, 2 Nov 2021 14:42:40 +0100 |
Per the "P32 Porting Guide" (rev 1.2) [1], chapter 2:
p32 ABI Overview
----------------
The Application Binary Interface, or ABI, is the set of rules
that all binaries must follow in order to run on a nanoMIPS
system. This includes, for example, object file format,
instruction set, data layout, subroutine calling convention,
and system call numbers. The ABI is one part of the mechanism
that maintains binary compatibility across all nanoMIPS platforms.
p32 improves on o32 to provide an ABI that is efficient in both
code density and performance. p32 is required for the nanoMIPS
architecture.
So far QEMU only support the MIPS o32 / n32 / n64 ABIs. The p32 ABI
is not implemented, therefore we can not run any nanoMIPS binary.
Revert commit f72541f3a59 ("elf: Relax MIPS' elf_check_arch() to
accept EM_NANOMIPS too").
See also the "ELF ABI Supplement" [2].
[1]
http://codescape.mips.com/components/toolchain/nanomips/2019.03-01/docs/MIPS_nanoMIPS_p32_ABI_Porting_Guide_01_02_DN00184.pdf
[2]
http://codescape.mips.com/components/toolchain/nanomips/2019.03-01/docs/MIPS_nanoMIPS_ABI_supplement_01_03_DN00179.pdf
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211101114800.2692157-1-f4bug@amsat.org>
---
linux-user/elfload.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index f9b82616920..5da8c02d082 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -925,8 +925,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
const CPUPPCState *en
#endif
#define ELF_ARCH EM_MIPS
-#define elf_check_arch(x) ((x) == EM_MIPS || (x) == EM_NANOMIPS)
-
#ifdef TARGET_ABI_MIPSN32
#define elf_check_abi(x) ((x) & EF_MIPS_ABI2)
#else
--
2.31.1
- [PULL 31/41] target/mips: Convert CFCMSA opcode to decodetree, (continued)
- [PULL 31/41] target/mips: Convert CFCMSA opcode to decodetree, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 32/41] target/mips: Convert CTCMSA opcode to decodetree, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 33/41] target/mips: Remove generic MSA opcode, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 34/41] target/mips: Remove one MSA unnecessary decodetree overlap group, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 36/41] target/mips: Remove obsolete FCR0_HAS2008 comment on P5600 CPU, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 35/41] target/mips: Fix Loongson-3A4000 MSAIR config register, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 37/41] usb/uhci: Misc clean up, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 38/41] usb/uhci: Disallow user creating a vt82c686-uhci-pci device, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 39/41] usb/uhci: Replace pci_set_irq with qemu_set_irq, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 40/41] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts, Philippe Mathieu-Daudé, 2021/11/02
- [PULL 41/41] Revert "elf: Relax MIPS' elf_check_arch() to accept EM_NANOMIPS too",
Philippe Mathieu-Daudé <=
- Re: [PULL 00/41] MIPS patches for 2021-11-02, Richard Henderson, 2021/11/02