diff options
| author | Russ Cox <rsc@golang.org> | 2015-01-19 13:24:43 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-01-21 03:15:04 +0000 |
| commit | be818361b9a5e73ade75fa1999ed0dec81de7cb6 (patch) | |
| tree | 34b62d0de1c4998e5ae4a6f8af2999c4a5d2d8c6 /include | |
| parent | 35d3987dbc49d0e2cae4e0cf70dabb62e62cbc50 (diff) | |
| download | go-be818361b9a5e73ade75fa1999ed0dec81de7cb6.tar.xz | |
[dev.cc] liblink: invoke 'go tool objwriter' to implement writeobj, if directed
This CL enables moving the bulk of the object writing code
out of liblink and into translated Go libraries in cmd/internal/obj,
but it does not do the move.
This CL introduces two new environment variables,
$GOOBJ and $GOOBJWRITER, but both will be deleted along with
the rest of the liblink C code.
The default behavior of a build is unchanged by this CL:
the C version of liblink uses the C object layout and writing code.
If $GOOBJ=1, liblink invokes go tool objwriter instead.
If $GOOBJ=2, liblink does its own layout and then invokes
go tool objwriter, which checks that it gets the same answer.
That is, in $GOOBJ=2 mode, both the C and the Go version of
the code run, and the operation fails if the two produce different
answers. This provides a very strong check that the translation
is working correctly.
Change-Id: I56ab49b07ccb2c7b81085f1d6950131047c6aa3c
Reviewed-on: https://go-review.googlesource.com/3048
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/link.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/link.h b/include/link.h index 15a2878792..5dffe7bc64 100644 --- a/include/link.h +++ b/include/link.h @@ -115,6 +115,7 @@ struct Prog uchar ft; /* 6l, 8l oclass cache */ uchar tt; // 6l, 8l uchar isize; // 6l, 8l + uchar printed; char width; /* fake for DATA */ char mode; /* 16, 32, or 64 in 6l, 8l; internal use in 5g, 6g, 8g */ @@ -145,6 +146,7 @@ struct LSym uchar localentry; // ppc64: instrs between global & local entry uchar seenglobl; uchar onlist; // on the textp or datap lists + uchar printed; int16 symid; // for writing .5/.6/.8 files int32 dynid; int32 sig; @@ -300,6 +302,7 @@ struct Hist char* name; int32 line; int32 offset; + uchar printed; }; struct Plist |
