All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org
Cc: x86@kernel.org, linux-kbuild@vger.kernel.org, mmarek@suse.cz,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 01/19] x86, lto: Disable LTO for the x86 VDSO
Date: Fri, 14 Feb 2014 22:21:25 +0100	[thread overview]
Message-ID: <1392412903-25733-2-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1392412903-25733-1-git-send-email-andi@firstfloor.org>

From: Andi Kleen <ak@linux.intel.com>

The VDSO does not play well with LTO, so just disable LTO for it.
Also pass a 32bit linker flag for the 32bit version.

Cc: x86@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/vdso/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index fd14be1..598f163 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -2,6 +2,8 @@
 # Building vDSO images for x86.
 #
 
+KBUILD_CFLAGS += ${DISABLE_LTO}
+
 VDSO64-$(CONFIG_X86_64)		:= y
 VDSOX32-$(CONFIG_X86_X32_ABI)	:= y
 VDSO32-$(CONFIG_X86_32)		:= y
@@ -35,7 +37,8 @@ export CPPFLAGS_vdso.lds += -P -C
 
 VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
 			-Wl,--no-undefined \
-		      	-Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
+			-Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \
+			$(DISABLE_LTO)
 
 $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
 
@@ -127,7 +130,7 @@ vdso32.so-$(VDSO32-y)		+= sysenter
 vdso32-images			= $(vdso32.so-y:%=vdso32-%.so)
 
 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
-VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1
+VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf_i386 -Wl,-soname=linux-gate.so.1
 
 # This makes sure the $(obj) subdirectory exists even though vdso32/
 # is not a kbuild sub-make subdirectory.
@@ -181,7 +184,8 @@ quiet_cmd_vdso = VDSO    $@
 		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
 		 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
 
-VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
+VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \
+		${LTO_CFLAGS}
 GCOV_PROFILE := n
 
 #
-- 
1.8.5.2


  reply	other threads:[~2014-02-14 21:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 21:21 Updated Link-Time-Optimization patchkit Andi Kleen
2014-02-14 21:21 ` Andi Kleen [this message]
2014-02-15 21:26   ` [PATCH 01/19] x86, lto: Disable LTO for the x86 VDSO Sam Ravnborg
2014-02-14 21:21 ` [PATCH 02/19] lto: Disable LTO for hweight functions Andi Kleen
2014-02-14 21:21 ` [PATCH 03/19] lto: Make asmlinkage __visible Andi Kleen
2014-02-15 21:28   ` Sam Ravnborg
2014-02-14 21:21 ` [PATCH 04/19] lto, workaround: Add workaround for initcall reordering Andi Kleen
2014-02-14 21:21 ` [PATCH 05/19] lto: Handle LTO common symbols in module loader Andi Kleen
2014-02-14 21:21 ` [PATCH 06/19] lto: Disable LTO for sys_ni Andi Kleen
2014-02-14 21:21 ` [PATCH 07/19] lto: Don't let LATENCYTOP and LOCKDEP select KALLSYMS_ALL Andi Kleen
2014-02-14 21:21 ` [PATCH 08/19] Kbuild, lto, workaround: Don't warn for initcall_reference in modpost Andi Kleen
2014-02-15 21:36   ` Sam Ravnborg
2014-02-14 21:21 ` [PATCH 09/19] Kbuild, lto: Drop .number postfixes " Andi Kleen
2014-02-14 21:21 ` [PATCH 10/19] Kbuild, lto: add ld-version and ld-ifversion macros Andi Kleen
2014-02-15 21:32   ` Sam Ravnborg
2014-02-14 21:21 ` [PATCH 11/19] Kbuild, lto: Add a gcc-ld script to let run gcc as ld Andi Kleen
2014-02-14 21:21 ` [PATCH 12/19] Kbuild, lto: Disable LTO for asm-offsets.c Andi Kleen
2014-02-14 21:21 ` [PATCH 13/19] Kbuild, lto: Set TMPDIR for LTO v2 Andi Kleen
2014-02-14 21:21 ` [PATCH 14/19] Kbuild, lto: Handle basic LTO in modpost Andi Kleen
2014-02-15 21:35   ` Sam Ravnborg
2014-02-14 21:21 ` [PATCH 15/19] Kbuild, lto: Fix single pass kallsyms for LTO Andi Kleen
2014-02-14 21:21 ` [PATCH 16/19] Kbuild, lto: Add Link Time Optimization support v2 Andi Kleen
2014-02-14 21:21 ` [PATCH 17/19] lto: Mark spinlocks noinline when inline spinlocks are disabled Andi Kleen
2014-02-14 21:21 ` [PATCH 18/19] lto, module: Warn about modules that are not fully LTOed Andi Kleen
2014-02-14 21:21 ` [PATCH 19/19] lto: Don't inline __const_udelay Andi Kleen
2014-02-15 13:38 ` Updated Link-Time-Optimization patchkit Markus Trippelsdorf
2014-02-15 17:44   ` Andi Kleen
2014-02-15 18:41     ` H.J. Lu
2014-02-15 21:24     ` Sam Ravnborg
2014-02-16  3:35       ` Andi Kleen

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=1392412903-25733-2-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.