diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/vdso/Makefile | 14 | ||||
-rw-r--r-- | arch/x86/vdso/vdso.lds.S | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index e7bff0fbac23..d8200adae9fa 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile | |||
@@ -55,6 +55,20 @@ SYSCFLAGS_vdso-syms.o = -r -d | |||
55 | $(obj)/vdso-syms.o: $(src)/vdso.lds $(vobjs) FORCE | 55 | $(obj)/vdso-syms.o: $(src)/vdso.lds $(vobjs) FORCE |
56 | $(call if_changed,syscall) | 56 | $(call if_changed,syscall) |
57 | 57 | ||
58 | targets += vdso-syms.lds | ||
59 | obj-y += vdso-syms.lds | ||
60 | |||
61 | # | ||
62 | # Match symbols in the DSO that look like VDSO*; produce a file of constants. | ||
63 | # | ||
64 | sed-vdsosym := -e 's/^00*/0/' \ | ||
65 | -e 's/^\([0-9a-fA-F]*\) . \(VDSO[a-zA-Z0-9_]*\)$$/\2 = 0x\1;/p' | ||
66 | quiet_cmd_vdsosym = VDSOSYM $@ | ||
67 | cmd_vdsosym = $(NM) $< | sed -n $(sed-vdsosym) | LC_ALL=C sort > $@ | ||
68 | |||
69 | $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE | ||
70 | $(call if_changed,vdsosym) | ||
71 | |||
58 | quiet_cmd_vdso_install = INSTALL $@ | 72 | quiet_cmd_vdso_install = INSTALL $@ |
59 | cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ | 73 | cmd_vdso_install = cp $(obj)/$@.dbg $(MODLIB)/vdso/$@ |
60 | vdso.so: | 74 | vdso.so: |
diff --git a/arch/x86/vdso/vdso.lds.S b/arch/x86/vdso/vdso.lds.S index 667d3245d972..d40d0e906190 100644 --- a/arch/x86/vdso/vdso.lds.S +++ b/arch/x86/vdso/vdso.lds.S | |||
@@ -8,6 +8,16 @@ | |||
8 | 8 | ||
9 | #define VDSO_PRELINK 0xffffffffff700000 | 9 | #define VDSO_PRELINK 0xffffffffff700000 |
10 | 10 | ||
11 | /* | ||
12 | * Symbols we define here called VDSO* get their values into vdso-syms.lds | ||
13 | * and become visible to the kernel itself. | ||
14 | */ | ||
15 | VDSO64_PRELINK = VDSO_PRELINK; | ||
16 | |||
17 | #define VEXTERN(x) VDSO64_ ## x = vdso_ ## x; | ||
18 | #include "vextern.h" | ||
19 | #undef VEXTERN | ||
20 | |||
11 | SECTIONS | 21 | SECTIONS |
12 | { | 22 | { |
13 | . = VDSO_PRELINK + SIZEOF_HEADERS; | 23 | . = VDSO_PRELINK + SIZEOF_HEADERS; |