]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: maintain correct headstring needed by windows port.
authorShenghou Ma <minux.ma@gmail.com>
Tue, 17 Dec 2013 12:36:01 +0000 (07:36 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 17 Dec 2013 12:36:01 +0000 (07:36 -0500)
Fixes build for go_bootstrap.
Fixes #6971.

R=alex.brainman, mattn.jp, rsc
CC=golang-dev
https://golang.org/cl/43130043

src/cmd/ld/lib.c
src/cmd/ld/pobj.c

index 53c3ebd43c54f6024a0715c2ed38082684fe18da..76a3a1393a84899c1f69ff6f56025cde412e8ef1 100644 (file)
@@ -1255,6 +1255,7 @@ setheadtype(char *s)
                fprint(2, "unknown header type -H %s\n", s);
                errorexit();
        }
+       headstring = s;
        HEADTYPE = headtype(s);
 }
 
index 16d908a40737dacabdb68c28cc5a8355b56a0131..08d44f63763394129e9e69015532ea316e593166 100644 (file)
@@ -138,6 +138,8 @@ main(int argc, char *argv[])
        if(HEADTYPE == -1)
                HEADTYPE = headtype(goos);
        ctxt->headtype = HEADTYPE;
+       if (headstring == NULL)
+               headstring = headstr(HEADTYPE);
 
        archinit();
        ctxt->linkmode = linkmode;