diff options
Diffstat (limited to 'src/cmd/6l/obj.c')
| -rw-r--r-- | src/cmd/6l/obj.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c index e381b90a76..1cb4bd2aaa 100644 --- a/src/cmd/6l/obj.c +++ b/src/cmd/6l/obj.c @@ -108,6 +108,7 @@ main(int argc, char *argv[]) flagcount("d", "disable dynamic executable", &debug['d']); flagcount("f", "ignore version mismatch", &debug['f']); flagcount("g", "disable go package data checks", &debug['g']); + flagcount("hostobj", "generate host object file", &isobj); flagstr("k", "sym: set field tracking symbol", &tracksym); flagcount("n", "dump symbol table", &debug['n']); flagstr("o", "outfile: set output file", &outfile); @@ -130,6 +131,15 @@ main(int argc, char *argv[]) if(HEADTYPE == -1) HEADTYPE = headtype(goos); + if(isobj) { + switch(HEADTYPE) { + default: + sysfatal("cannot use -hostobj with -H %s", headstr(HEADTYPE)); + case Hlinux: + break; + } + } + if(outfile == nil) { if(HEADTYPE == Hwindows) outfile = "6.out.exe"; |
