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