1 #include <sys/personality.h>
6 #include <ulz/stdio-repl.h>
10 #if !defined(_Noreturn) && __STDC_VERSION__+0 < 201112L
12 #define _Noreturn __attribute__((noreturn))
22 static _Noreturn
void die(const char *msg
) {
27 static _Noreturn
void usage(void) {
28 die("usage: linux32 command [options...]\n"
29 "executes command with options in 32bit linux mode\n"
30 "(uname will report 32bit arch)\n");
33 int main(int argc
, char** argv
) {
34 if(argc
== 1) usage();
35 if(personality(PER_LINUX32
) == -1) die("could not set 32bit persona");
36 extern char ** environ
;
37 if(execve(argv
[1], &argv
[1], environ
) == -1) perror("execve");