aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 22:16:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 22:16:16 -0400
commit42964c6f6261f6b44bb43cabc93ac9e39b5a9a54 (patch)
treeba3bd8bbb93e457d1ba5f83a81c7071c02d13a2f
parent1b246d224e27c62bfd0d658c44cc4374061d956d (diff)
parent1742ed2088ccc4ade3abd8fe888742dd0f1343f8 (diff)
Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 build updates from Ingo Molnar: "A handful of build system (Makefile, linker script) cleanups by Masahiro Yamada" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build/vdso: Put generated linker scripts to $(obj)/ x86/build/vdso: Remove unnecessary export in Makefile x86/build/vdso: Remove unused $(vobjs-nox32) in Makefile x86/build: Remove no-op macro VMLINUX_SYMBOL()
-rw-r--r--arch/x86/entry/vdso/Makefile11
-rw-r--r--arch/x86/kernel/vmlinux.lds.S4
-rw-r--r--arch/x86/um/vdso/Makefile4
3 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index d998a487c9b1..261802b1cc50 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -44,14 +44,14 @@ obj-y += $(vdso_img_objs)
44targets += $(vdso_img_cfiles) 44targets += $(vdso_img_cfiles)
45targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so) 45targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so)
46 46
47export CPPFLAGS_vdso.lds += -P -C 47CPPFLAGS_vdso.lds += -P -C
48 48
49VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ 49VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
50 -Wl,--no-undefined \ 50 -Wl,--no-undefined \
51 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \ 51 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \
52 $(DISABLE_LTO) 52 $(DISABLE_LTO)
53 53
54$(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE 54$(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE
55 $(call if_changed,vdso) 55 $(call if_changed,vdso)
56 56
57HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/$(SUBARCH)/include/uapi 57HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/$(SUBARCH)/include/uapi
@@ -100,11 +100,8 @@ VDSO_LDFLAGS_vdsox32.lds = -Wl,-m,elf32_x86_64 \
100 -Wl,-z,max-page-size=4096 \ 100 -Wl,-z,max-page-size=4096 \
101 -Wl,-z,common-page-size=4096 101 -Wl,-z,common-page-size=4096
102 102
103# 64-bit objects to re-brand as x32
104vobjs64-for-x32 := $(filter-out $(vobjs-nox32),$(vobjs-y))
105
106# x32-rebranded versions 103# x32-rebranded versions
107vobjx32s-y := $(vobjs64-for-x32:.o=-x32.o) 104vobjx32s-y := $(vobjs-y:.o=-x32.o)
108 105
109# same thing, but in the output directory 106# same thing, but in the output directory
110vobjx32s := $(foreach F,$(vobjx32s-y),$(obj)/$F) 107vobjx32s := $(foreach F,$(vobjx32s-y),$(obj)/$F)
@@ -122,7 +119,7 @@ $(obj)/%.so: OBJCOPYFLAGS := -S
122$(obj)/%.so: $(obj)/%.so.dbg 119$(obj)/%.so: $(obj)/%.so.dbg
123 $(call if_changed,objcopy) 120 $(call if_changed,objcopy)
124 121
125$(obj)/vdsox32.so.dbg: $(src)/vdsox32.lds $(vobjx32s) FORCE 122$(obj)/vdsox32.so.dbg: $(obj)/vdsox32.lds $(vobjx32s) FORCE
126 $(call if_changed,vdso) 123 $(call if_changed,vdso)
127 124
128CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) 125CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 795f3a80e576..5e1458f609a1 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -117,11 +117,11 @@ SECTIONS
117 117
118#ifdef CONFIG_X86_64 118#ifdef CONFIG_X86_64
119 . = ALIGN(PAGE_SIZE); 119 . = ALIGN(PAGE_SIZE);
120 VMLINUX_SYMBOL(__entry_trampoline_start) = .; 120 __entry_trampoline_start = .;
121 _entry_trampoline = .; 121 _entry_trampoline = .;
122 *(.entry_trampoline) 122 *(.entry_trampoline)
123 . = ALIGN(PAGE_SIZE); 123 . = ALIGN(PAGE_SIZE);
124 VMLINUX_SYMBOL(__entry_trampoline_end) = .; 124 __entry_trampoline_end = .;
125 ASSERT(. - _entry_trampoline == PAGE_SIZE, "entry trampoline is too big"); 125 ASSERT(. - _entry_trampoline == PAGE_SIZE, "entry trampoline is too big");
126#endif 126#endif
127 127
diff --git a/arch/x86/um/vdso/Makefile b/arch/x86/um/vdso/Makefile
index 10003359e633..b2d6967262b2 100644
--- a/arch/x86/um/vdso/Makefile
+++ b/arch/x86/um/vdso/Makefile
@@ -23,14 +23,14 @@ $(obj)/vdso.o: $(obj)/vdso.so
23 23
24targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y) 24targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y)
25 25
26export CPPFLAGS_vdso.lds += -P -C 26CPPFLAGS_vdso.lds += -P -C
27 27
28VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ 28VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
29 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 29 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
30 30
31$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so 31$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
32 32
33$(obj)/vdso.so.dbg: $(src)/vdso.lds $(vobjs) FORCE 33$(obj)/vdso.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE
34 $(call if_changed,vdso) 34 $(call if_changed,vdso)
35 35
36$(obj)/%.so: OBJCOPYFLAGS := -S 36$(obj)/%.so: OBJCOPYFLAGS := -S