From 4d1d51dc4b13af9771d8c35e16299c8744fc106d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 2008 13:30:40 +0100 Subject: [PATCH] --- yaml --- r: 79831 b: refs/heads/master c: 5b93049337301d6fbd3cf55db99b34e6b0dbd3a3 h: refs/heads/master i: 79829: 23bc87a4328449fadee82cace74b191eb121a07a 79827: 002c85b08ffa7b03493ac111dde232f60d49c43b 79823: 113233cd9fd91d3236aa43d06fdd4849547dff8b v: v3 --- [refs] | 2 +- trunk/arch/x86/vdso/Makefile | 14 ++++++++++++++ trunk/arch/x86/vdso/vdso.lds.S | 10 ++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9b6cd423c8b7..d12c495d9b61 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c1d171a002942ea2d93b4fbd0c9583c56fce0772 +refs/heads/master: 5b93049337301d6fbd3cf55db99b34e6b0dbd3a3 diff --git a/trunk/arch/x86/vdso/Makefile b/trunk/arch/x86/vdso/Makefile index e7bff0fbac23..d8200adae9fa 100644 --- a/trunk/arch/x86/vdso/Makefile +++ b/trunk/arch/x86/vdso/Makefile @@ -55,6 +55,20 @@ SYSCFLAGS_vdso-syms.o = -r -d $(obj)/vdso-syms.o: $(src)/vdso.lds $(vobjs) FORCE $(call if_changed,syscall) +targets += vdso-syms.lds +obj-y += vdso-syms.lds + +# +# Match symbols in the DSO that look like VDSO*; produce a file of constants. +# +sed-vdsosym := -e 's/^00*/0/' \ + -e 's/^\([0-9a-fA-F]*\) . \(VDSO[a-zA-Z0-9_]*\)$$/\2 = 0x\1;/p' +quiet_cmd_vdsosym = VDSOSYM $@ + cmd_vdsosym = $(NM) $< | sed -n $(sed-vdsosym) | LC_ALL=C sort > $@ + +$(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE + $(call if_changed,vdsosym) + quiet_cmd_vdso_install = INSTALL $@ cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ vdso.so: diff --git a/trunk/arch/x86/vdso/vdso.lds.S b/trunk/arch/x86/vdso/vdso.lds.S index 667d3245d972..d40d0e906190 100644 --- a/trunk/arch/x86/vdso/vdso.lds.S +++ b/trunk/arch/x86/vdso/vdso.lds.S @@ -8,6 +8,16 @@ #define VDSO_PRELINK 0xffffffffff700000 +/* + * Symbols we define here called VDSO* get their values into vdso-syms.lds + * and become visible to the kernel itself. + */ +VDSO64_PRELINK = VDSO_PRELINK; + +#define VEXTERN(x) VDSO64_ ## x = vdso_ ## x; +#include "vextern.h" +#undef VEXTERN + SECTIONS { . = VDSO_PRELINK + SIZEOF_HEADERS;