[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] x86/vdso: drop implicit common-page-size linker flag
These are implied by the target architecture and for x86_64 match the
max-page-size. The default for non-NaCl x86_64 is 0x1000 (4096).

In bfd the common page size is defined as 0x1000 (4096) for non-NaCl
x86_64 targets:

4998:#define ELF_COMMONPAGESIZE 0x1000

For gold, the common page size is defined as 0x1000 (4096) for non-NaCl
x86_64 targets:

1413: 0x1000, // common_pagesize (overridable by -z common-page-size)
1442: 0x1000, // common_pagesize (overridable by -z common-page-size)

(ELF_COMMONPAGESIZE also defaults to ELF_MAXPAGESIZE when not set
explicitly for a target architecture in bfd/elfxx-target.h, but that's
not relevant for x86_64).

Because it's implied by the target architecture, it's of questionable
use to implement in LLD. This patch resolves one of the issues towards
using LLD to link an x86_64 kernel.

Fixes commit 2aae950b21e4 ("x86_64: Add vDSO for x86-64 with

Cc: Fangrui Song <>
Cc: Andi Kleen <>
Cc: Andi Kleen <>
Reported-by: Dmitry Golovin <>
Reported-by: Bill Wendling <>
Suggested-by: Dmitry Golovin <>
Suggested-by: Rui Ueyama <>
Signed-off-by: Nick Desaulniers <>
arch/x86/entry/vdso/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index 141d415a8c80..0624bf2266fd 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -47,7 +47,7 @@ targets += $(vdso_img_sodbg) $( += -P -C = -m elf_x86_64 -soname --no-undefined \
- -z max-page-size=4096 -z common-page-size=4096
+ -z max-page-size=4096

$(obj)/ $(obj)/ $(vobjs) FORCE
$(call if_changed,vdso)
@@ -98,7 +98,7 @@ CFLAGS_REMOVE_vvar.o = -pg = $( = -m elf32_x86_64 -soname \
- -z max-page-size=4096 -z common-page-size=4096
+ -z max-page-size=4096

# x32-rebranded versions
vobjx32s-y := $(vobjs-y:.o=-x32.o)
 \ /
  Last update: 2018-12-06 20:13    [W:0.157 / U:2.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site