0001-x86-relocs-Make-per_cpu_load_addr-static.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From eeeda4cd06e828b331b15741a204ff9f5874d28d Mon Sep 17 00:00:00 2001
  2. From: Ben Hutchings <ben@decadent.org.uk>
  3. Date: Wed, 24 Sep 2014 13:30:12 +0100
  4. Subject: [PATCH] x86/relocs: Make per_cpu_load_addr static
  5. per_cpu_load_addr is only used for 64-bit relocations, but is
  6. declared in both configurations of relocs.c - with different
  7. types. This has undefined behaviour in general. GNU ld is
  8. documented to use the larger size in this case, but other tools
  9. may differ and some warn about this.
  10. References: https://bugs.debian.org/748577
  11. Reported-by: Michael Tautschnig <mt@debian.org>
  12. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  13. Cc: 748577@bugs.debian.org
  14. Cc: Linus Torvalds <torvalds@linux-foundation.org>
  15. Link: http://lkml.kernel.org/r/1411561812.3659.23.camel@decadent.org.uk
  16. Signed-off-by: Ingo Molnar <mingo@kernel.org>
  17. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  18. ---
  19. arch/x86/tools/relocs.c | 2 +-
  20. 1 file changed, 1 insertion(+), 1 deletion(-)
  21. diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
  22. index bbb1d2259ecf..a5efb21d5228 100644
  23. --- a/arch/x86/tools/relocs.c
  24. +++ b/arch/x86/tools/relocs.c
  25. @@ -695,7 +695,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
  26. *
  27. */
  28. static int per_cpu_shndx = -1;
  29. -Elf_Addr per_cpu_load_addr;
  30. +static Elf_Addr per_cpu_load_addr;
  31. static void percpu_init(void)
  32. {
  33. --
  34. 2.25.1