[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1400456236.17377.10.camel@deadeye.wl.decadent.org.uk>
Date: Mon, 19 May 2014 00:37:16 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: x86@...nel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Michael Tautschnig <mt@...ian.org>, 748577@...s.debian.org
Subject: [PATCH] x86: relocs: Make per_cpu_load_addr static
per_cpu_load_addr is only used for 64-bit relocations, but is declared
in both configurations of relocs.c - with different types. This has
undefined behaviour in general. GNU ld is documented to use the
larger size in this case, but other tools may differ and some warn
about this.
References: https://bugs.debian.org/748577
Reported-by: Michael Tautschnig <mt@...ian.org>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
arch/x86/tools/relocs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index bbb1d22..a5efb21 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -695,7 +695,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
*
*/
static int per_cpu_shndx = -1;
-Elf_Addr per_cpu_load_addr;
+static Elf_Addr per_cpu_load_addr;
static void percpu_init(void)
{
--
Ben Hutchings
It is easier to change the specification to fit the program than vice versa.
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists