1
0
linux/debian/rules.d/tools/objtool/objtool.c
Konstantin Demin c3d09a3e94 initial commit
imported from https://salsa.debian.org/kernel-team/linux.git
commit 9d5cc9d9d6501d7f1dd7e194d4b245bd0b6c6a22
version 6.11.4-1
2024-10-23 12:12:30 +03:00

22 lines
404 B
C

#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;
}