https://github.com/torvalds/linux
Revision cf8dc57cbac0fe089308f57c333ab763c36782ff authored by Andi Kleen on 01 October 2007, 08:20:08 UTC, committed by Linus Torvalds on 02 October 2007, 02:21:30 UTC
For some reason old binutils genertate larger headers so increase the text
offset of the vdso to avoid linker errors.

Roland McGrath explains:
  "There are extra symbols in the '.dynsym' section that are responsible
   for the size difference (They also cause corresponding inflation in
   '.gnu.version')

   Older ld's wrongly generated these unneeded symbols in .dynsym.  This
   was fixed not all that long ago (2006); binutils-2.17.50.0.6 might be
   the first fixed version, but I have not verified for sure where the
   cutoff was.

   The unneeded symbols et al from old ld add almost 700 bytes excess.
   This limits fairly tightly the amount by which the actual text and
   data in the vDSO can grow in the future without pushing the whole
   file over 4kb.  If it does grow later on, we should consider changing
   the layout with a config option or something to pack it better
   without that padding, when building the kernel with newer binutils."

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Roland McGrath <roland@redhat.com>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7572395
Raw File
Tip revision: cf8dc57cbac0fe089308f57c333ab763c36782ff authored by Andi Kleen on 01 October 2007, 08:20:08 UTC
x86_64: increase VDSO_TEXT_OFFSET for ancient binutils
Tip revision: cf8dc57
Kbuild
#
# Kbuild for top-level directory of the kernel
# This file takes care of the following:
# 1) Generate asm-offsets.h
# 2) Check for missing system calls

#####
# 1) Generate asm-offsets.h
#

offsets-file := include/asm-$(ARCH)/asm-offsets.h

always  := $(offsets-file)
targets := $(offsets-file)
targets += arch/$(ARCH)/kernel/asm-offsets.s
clean-files := $(addprefix $(objtree)/,$(targets))

# Default sed regexp - multiline due to syntax constraints
define sed-y
	"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
endef
# Override default regexp for specific architectures
sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"

quiet_cmd_offsets = GEN     $@
define cmd_offsets
	(set -e; \
	 echo "#ifndef __ASM_OFFSETS_H__"; \
	 echo "#define __ASM_OFFSETS_H__"; \
	 echo "/*"; \
	 echo " * DO NOT MODIFY."; \
	 echo " *"; \
	 echo " * This file was generated by Kbuild"; \
	 echo " *"; \
	 echo " */"; \
	 echo ""; \
	 sed -ne $(sed-y) $<; \
	 echo ""; \
	 echo "#endif" ) > $@
endef

# We use internal kbuild rules to avoid the "is up to date" message from make
arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
	$(Q)mkdir -p $(dir $@)
	$(call if_changed_dep,cc_s_c)

$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
	$(Q)mkdir -p $(dir $@)
	$(call cmd,offsets)

#####
# 2) Check for missing system calls
#

quiet_cmd_syscalls = CALL    $<
      cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags)

PHONY += missing-syscalls
missing-syscalls: scripts/checksyscalls.sh FORCE
	$(call cmd,syscalls)
back to top