blob: beb42c631fa32bdcb7b7f1c97f1a13c184bc9258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
const char *arch;
char prog[1024];
arch = getenv("SRCARCH");
if (!arch) {
fprintf(stderr, "objtool: SRCARCH variable not defined\n");
return 2;
}
snprintf(prog, sizeof(prog), "%s.real-%s", argv[0], arch);
execv(prog, argv);
fprintf(stderr, "objtool: Failed to execute %s\n", prog);
return 1;
}
|