summaryrefslogtreecommitdiff
path: root/libexec/ld.so/i386
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2018-10-25 16:41:39 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2018-10-25 16:41:39 +0000
commitfa62b0aefb2b5fe105e25eb8cdf1b39306df5212 (patch)
treecf1cbb924a469f8895581c2a532a56ff3d1fef67 /libexec/ld.so/i386
parent216fbb53067c8e910c8fb04d387ca5b45600039a (diff)
The compilers already put static arrays in .rodata when not written to;
marking them const will keep a source change from silently moving them back to .data ok deraadt@ kettenis@
Diffstat (limited to 'libexec/ld.so/i386')
-rw-r--r--libexec/ld.so/i386/rtld_machine.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c
index 4390b0d7ce9..a420f670114 100644
--- a/libexec/ld.so/i386/rtld_machine.c
+++ b/libexec/ld.so/i386/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.37 2017/06/04 14:20:12 naddy Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.38 2018/10/25 16:41:38 guenther Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -101,7 +101,7 @@ int64_t pcookie __attribute__((section(".openbsd.randomdata"))) __dso_hidden;
#define _RF_U 0x04000000 /* Unaligned */
#define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */
#define _RF_RS(s) ((s) & 0xff) /* right shift */
-static int reloc_target_flags[] = {
+static const int reloc_target_flags[] = {
0, /* NONE */
_RF_S|_RF_A| _RF_SZ(32) | _RF_RS(0), /* RELOC_32*/
_RF_S|_RF_A|_RF_P| _RF_SZ(32) | _RF_RS(0), /* PC32 */
@@ -136,7 +136,7 @@ static int reloc_target_flags[] = {
#define RELOC_TARGET_SIZE(t) ((reloc_target_flags[t] >> 8) & 0xff)
#define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff)
-static long reloc_target_bitmask[] = {
+static const long reloc_target_bitmask[] = {
#define _BM(x) (~(-(1ULL << (x))))
0, /* NONE */
_BM(32), /* RELOC_32*/