Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw built program fails to run on Windows 2000 #586

Closed
alexbrainman opened this issue Feb 4, 2010 · 2 comments
Closed

mingw built program fails to run on Windows 2000 #586

alexbrainman opened this issue Feb 4, 2010 · 2 comments

Comments

@alexbrainman
Copy link
Member

What steps will reproduce the problem?

1. install go

cd $GOROOT/src
./all.bash

2. cross compile mingw runtime

export GOOS=mingw
cd $GOROOT/src/pkg/runtime
make clean
make install

3. cross compile my simple program

cd ~/test
cat test.go

package main

func main() {
    print("hello world\n")
}

export GOOS=mingw
~/bin/8g -o _go_.8 test.go
~/bin/8l -o test.exe _go_.8

4. copy resulting binary test.exe to Win2000 pc and run it, it output
nothing and exits.

What is the expected output? 

hello world

What do you see instead?

<nothing>

What is your $GOOS?  $GOARCH?

GOARCH=386
GOOS=linux

Which revision are you using?  (hg identify)

36e71486f51f+ tip

Please provide any additional information below.

I figured the problem is that the executable built by 8l, doesn't have
"import table" and Win2000 loader is not smart enough to implicitly link
kernel32.dll functions, used by runtime. The reference that helped me here
is: http://www.phreedom.org/solar/code/tinype/. That's the only ref I could
find.

I have made the change to the PE building code, and it seems to be doing
the trick. Happy to provide the code.


Thank you.
@rsc
Copy link
Contributor

rsc commented Feb 7, 2010

Comment 1:

Please send a CL as described at http://golang.org/doc/contribute.html
Thanks.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Feb 10, 2010

Comment 2:

This issue was closed by revision 3b1a718.

Status changed to Fixed.

Merged into issue #-.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants