aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/vdso/vdso2c.h
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@amacapital.net>2014-05-30 11:48:48 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-05-30 19:58:39 -0400
commit011561837dad082a92c0537db2d134e66419c6ad (patch)
treeab06fc63a9dc39a17867030b0e04441aaf2af004 /arch/x86/vdso/vdso2c.h
parent94aca80897501f994c795cffc458ecd0404377c7 (diff)
x86/vdso, build: When vdso2c fails, unlink the output
This avoids bizarre failures if make is run again. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Link: http://lkml.kernel.org/r/1764385fe9931e8940b9d001132515448ea89523.1401464755.git.luto@amacapital.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/vdso/vdso2c.h')
-rw-r--r--arch/x86/vdso/vdso2c.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/vdso/vdso2c.h b/arch/x86/vdso/vdso2c.h
index 3dcc61e796e9..26a7c1fa7452 100644
--- a/arch/x86/vdso/vdso2c.h
+++ b/arch/x86/vdso/vdso2c.h
@@ -4,7 +4,7 @@
4 * are built for 32-bit userspace. 4 * are built for 32-bit userspace.
5 */ 5 */
6 6
7static int GOFUNC(void *addr, size_t len, FILE *outfile, const char *name) 7static void GOFUNC(void *addr, size_t len, FILE *outfile, const char *name)
8{ 8{
9 int found_load = 0; 9 int found_load = 0;
10 unsigned long load_size = -1; /* Work around bogus warning */ 10 unsigned long load_size = -1; /* Work around bogus warning */
@@ -62,10 +62,8 @@ static int GOFUNC(void *addr, size_t len, FILE *outfile, const char *name)
62 alt_sec = sh; 62 alt_sec = sh;
63 } 63 }
64 64
65 if (!symtab_hdr) { 65 if (!symtab_hdr)
66 fail("no symbol table\n"); 66 fail("no symbol table\n");
67 return 1;
68 }
69 67
70 strtab_hdr = addr + hdr->e_shoff + 68 strtab_hdr = addr + hdr->e_shoff +
71 hdr->e_shentsize * symtab_hdr->sh_link; 69 hdr->e_shentsize * symtab_hdr->sh_link;
@@ -112,7 +110,7 @@ static int GOFUNC(void *addr, size_t len, FILE *outfile, const char *name)
112 110
113 if (!name) { 111 if (!name) {
114 fwrite(addr, load_size, 1, outfile); 112 fwrite(addr, load_size, 1, outfile);
115 return 0; 113 return;
116 } 114 }
117 115
118 fprintf(outfile, "/* AUTOMATICALLY GENERATED -- DO NOT EDIT */\n\n"); 116 fprintf(outfile, "/* AUTOMATICALLY GENERATED -- DO NOT EDIT */\n\n");
@@ -152,6 +150,4 @@ static int GOFUNC(void *addr, size_t len, FILE *outfile, const char *name)
152 required_syms[i], syms[i]); 150 required_syms[i], syms[i]);
153 } 151 }
154 fprintf(outfile, "};\n"); 152 fprintf(outfile, "};\n");
155
156 return 0;
157} 153}