From: tip-bot for Jan Beulich <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
boris.ostrovsky@oracle.com, jbeulich@suse.com,
luto@amacapital.net, akpm@linux-foundation.org,
JBeulich@suse.com, tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/urgent] x86-64, vdso: Fix vDSO build breakage due to empty .rela.dyn
Date: Thu, 10 Jul 2014 16:04:16 -0700 [thread overview]
Message-ID: <tip-9f88b906b4455465d60ac18b8c95904f320038d5@git.kernel.org> (raw)
In-Reply-To: <53B5861E02000078000204D1@mail.emea.novell.com>
Commit-ID: 9f88b906b4455465d60ac18b8c95904f320038d5
Gitweb: http://git.kernel.org/tip/9f88b906b4455465d60ac18b8c95904f320038d5
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Thu, 3 Jul 2014 15:34:38 +0100
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 10 Jul 2014 15:59:56 -0700
x86-64, vdso: Fix vDSO build breakage due to empty .rela.dyn
Certain ld versions (observed with 2.20.0) put an empty .rela.dyn
section into shared object files, breaking the assumption on the number
of sections to be copied to the final output. Simply discard any empty
SHT_REL and SHT_RELA sections to address this.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/53B5861E02000078000204D1@mail.emea.novell.com
Acked-by: Andy Lutomirski <luto@amacapital.net>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/vdso/vdso2c.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
index df95a2f..11b65d4 100644
--- a/arch/x86/vdso/vdso2c.h
+++ b/arch/x86/vdso/vdso2c.h
@@ -93,6 +93,9 @@ static void BITSFUNC(copy_section)(struct BITSFUNC(fake_sections) *out,
uint64_t flags = GET_LE(&in->sh_flags);
bool copy = flags & SHF_ALLOC &&
+ (GET_LE(&in->sh_size) ||
+ (GET_LE(&in->sh_type) != SHT_RELA &&
+ GET_LE(&in->sh_type) != SHT_REL)) &&
strcmp(name, ".altinstructions") &&
strcmp(name, ".altinstr_replacement");
prev parent reply other threads:[~2014-07-10 23:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 14:34 [PATCH] x86-64: fix vDSO build Jan Beulich
2014-07-03 15:33 ` Andy Lutomirski
2014-07-03 23:09 ` Boris Ostrovsky
2014-07-09 23:30 ` Andrew Morton
2014-07-10 23:04 ` tip-bot for Jan Beulich [this message]
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=tip-9f88b906b4455465d60ac18b8c95904f320038d5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=boris.ostrovsky@oracle.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jbeulich@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®