From: Ben Hutchings <ben@decadent.org.uk>
To: x86@kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Michael Tautschnig <mt@debian.org>,
748577@bugs.debian.org
Subject: [PATCH RESEND] x86: relocs: Make per_cpu_load_addr static
Date: Wed, 24 Sep 2014 13:30:12 +0100 [thread overview]
Message-ID: <1411561812.3659.23.camel@decadent.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
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>
---
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
Everything should be made as simple as possible, but not simpler.
- Albert Einstein
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next reply other threads:[~2014-09-24 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 12:30 Ben Hutchings [this message]
2014-09-24 15:02 ` [tip:x86/boot] x86/relocs: " tip-bot for Ben Hutchings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411561812.3659.23.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=748577@bugs.debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mt@debian.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome