public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: fix vDSO build
@ 2014-07-03 14:34 Jan Beulich
  2014-07-03 15:33 ` Andy Lutomirski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jan Beulich @ 2014-07-03 14:34 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: Andy Lutomirski, linux-kernel

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>
Cc: Andy Lutomirski <luto@amacapital.net>
---
 arch/x86/vdso/vdso2c.h |    3 +++
 1 file changed, 3 insertions(+)

--- 3.16-rc3/arch/x86/vdso/vdso2c.h
+++ 3.16-rc3-x86-vdso-build/arch/x86/vdso/vdso2c.h
@@ -93,6 +93,9 @@ static void BITSFUNC(copy_section)(struc
 	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");
 




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-10 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:x86/urgent] x86-64, vdso: Fix vDSO build breakage due to empty .rela.dyn tip-bot for Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox