In a few places, the existing cgo tests assume that a
Go int is the same as a C int. Making int 64 bits wide
on 64-bit platforms violates this assumption.
Change that code to assume that Go int32 and C int
are the same instead. That's still not great, but it's better,
and I am unaware of any systems we run on where it is not true.
Update #2188.
R=iant, r
CC=golang-dev
https://golang.org/cl/6552064
Enhances test/run.go to support testing other directories
Will enable stdio tests on Windows in a follow-up CL.
R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/6220049
#pragma dynexport is no longer needed for
this use of cgo, since the gcc and gc code are
now linked together into the same binary.
It may still be necessary later.
On the Mac, you cannot use the GOT to resolve
symbols that exist in the current binary, so 6l and 8l
translate the GOT-loading mov instructions into lea
instructions.
On ELF systems, we could use the GOT for those
symbols, but for consistency 6l and 8l apply the
same translation.
The translation is sketchy in the extreme
(depending on the relocation being in a mov
instruction) but it verifies that the instruction
is a mov before rewriting it to lea.
Also makes typedefs global across files.
Fixes#1335.
Fixes#1345.
R=iant, r
CC=golang-dev
https://golang.org/cl/3650042