Jesse Keating 7a3296
diff --git a/Makefile b/Makefile
Jesse Keating 7a3296
index f908acc..960ff6f 100644
Jesse Keating 7a3296
--- a/Makefile
Jesse Keating 7a3296
+++ b/Makefile
Jesse Keating 7a3296
@@ -746,6 +746,10 @@ quiet_cmd_vmlinux__ ?= LD      $@
Jesse Keating 7a3296
       --start-group $(vmlinux-main) --end-group                  \
Jesse Keating 7a3296
       $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o FORCE ,$^)
Jesse Keating 7a3296
 
Jesse Keating 7a3296
+ifdef AFTER_LINK
Jesse Keating 7a3296
+cmd_vmlinux__ += ; $(AFTER_LINK)
Jesse Keating 7a3296
+endif
Jesse Keating 7a3296
+
Jesse Keating 7a3296
 # Generate new vmlinux version
Jesse Keating 7a3296
 quiet_cmd_vmlinux_version = GEN     .version
Jesse Keating 7a3296
       cmd_vmlinux_version = set -e;                     \
Jesse Keating 7a3296
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
Jesse Keating 7a3296
index 51ead52..ad21273 100644
Jesse Keating 7a3296
--- a/arch/powerpc/kernel/vdso32/Makefile
Jesse Keating 7a3296
+++ b/arch/powerpc/kernel/vdso32/Makefile
Jesse Keating 7a3296
@@ -41,7 +41,8 @@ $(obj-vdso32): %.o: %.S
Jesse Keating 7a3296
 
Jesse Keating 7a3296
 # actual build commands
Jesse Keating 7a3296
 quiet_cmd_vdso32ld = VDSO32L $@
Jesse Keating 7a3296
-      cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@
Jesse Keating 7a3296
+      cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ \
Jesse Keating 7a3296
+		     $(if $(AFTER_LINK),; $(AFTER_LINK))
Jesse Keating 7a3296
 quiet_cmd_vdso32as = VDSO32A $@
Jesse Keating 7a3296
       cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
Jesse Keating 7a3296
 
Jesse Keating 7a3296
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
Jesse Keating 7a3296
index 79da65d..f11c21b 100644
Jesse Keating 7a3296
--- a/arch/powerpc/kernel/vdso64/Makefile
Jesse Keating 7a3296
+++ b/arch/powerpc/kernel/vdso64/Makefile
Jesse Keating 7a3296
@@ -36,7 +36,8 @@ $(obj-vdso64): %.o: %.S
Jesse Keating 7a3296
 
Jesse Keating 7a3296
 # actual build commands
Jesse Keating 7a3296
 quiet_cmd_vdso64ld = VDSO64L $@
Jesse Keating 7a3296
-      cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
Jesse Keating 7a3296
+      cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ \
Jesse Keating 7a3296
+		     $(if $(AFTER_LINK),; $(AFTER_LINK))
Jesse Keating 7a3296
 quiet_cmd_vdso64as = VDSO64A $@
Jesse Keating 7a3296
       cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
Jesse Keating 7a3296
 
Jesse Keating 7a3296
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
Jesse Keating 7a3296
index 6b4ffed..cbc3d05 100644
Jesse Keating 7a3296
--- a/arch/x86/vdso/Makefile
Jesse Keating 7a3296
+++ b/arch/x86/vdso/Makefile
Jesse Keating 7a3296
@@ -120,7 +120,8 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE
Jesse Keating 7a3296
 quiet_cmd_vdso = VDSO    $@
Jesse Keating 7a3296
       cmd_vdso = $(CC) -nostdlib -o $@ \
Jesse Keating 7a3296
 		       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
Jesse Keating 7a3296
-		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
Jesse Keating 7a3296
+		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) \
Jesse Keating 7a3296
+		 $(if $(AFTER_LINK),; $(AFTER_LINK))
Jesse Keating 7a3296
 
Jesse Keating 7a3296
 VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
Jesse Keating 7a3296
 GCOV_PROFILE := n