target/mips: Constify host_to_mips_errno[]
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 11 May 2021 10:18:06 +0000 (12:18 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Thu, 24 Jun 2021 14:48:08 +0000 (16:48 +0200)
Keep host_to_mips_errno[] in .rodata by marking the array const.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210617174323.2900831-9-f4bug@amsat.org>

target/mips/tcg/sysemu/mips-semi.c

index 6de60fa6dd7b71ff4b5b6b34641b16bfdb0c175f..77108b0b1a9c3e07ae33506e12e26735a4facaec 100644 (file)
@@ -75,7 +75,7 @@ enum UHIOpenFlags {
 };
 
 /* Errno values taken from asm-mips/errno.h */
-static uint16_t host_to_mips_errno[] = {
+static const uint16_t host_to_mips_errno[] = {
     [ENAMETOOLONG] = 78,
 #ifdef EOVERFLOW
     [EOVERFLOW]    = 79,