Skip to content

Commit

Permalink
x86/relocs: Make per_cpu_load_addr static
Browse files Browse the repository at this point in the history
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@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: 748577@bugs.debian.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1411561812.3659.23.camel@decadent.org.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ben Hutchings authored and Ingo Molnar committed Sep 24, 2014
1 parent ce4b1b1 commit eeeda4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/tools/relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit eeeda4c

Please sign in to comment.