Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
e7042418
Commit
e7042418
authored
Oct 06, 2011
by
Wei Guangjing
Committed by
Hector Chu
Oct 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgo: support for mingw-w64 4.5.1 and newer
R=rsc, jp, hectorchu CC=golang-dev
https://golang.org/cl/4962051
parent
9a8da9d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
src/cmd/ld/ldpe.c
src/cmd/ld/ldpe.c
+10
-8
src/pkg/runtime/cgo/amd64.S
src/pkg/runtime/cgo/amd64.S
+1
-1
No files found.
src/cmd/ld/ldpe.c
View file @
e7042418
...
...
@@ -408,13 +408,15 @@ readsym(PeObj *obj, int i, PeSym **y)
sym
=
&
obj
->
pesym
[
i
];
*
y
=
sym
;
name
=
sym
->
name
;
if
(
sym
->
sclass
==
IMAGE_SYM_CLASS_STATIC
&&
sym
->
value
==
0
)
// section
if
(
sym
->
sclass
==
IMAGE_SYM_CLASS_STATIC
&&
sym
->
value
==
0
&&
sym
->
type
==
0
)
// section
name
=
obj
->
sect
[
sym
->
sectnum
-
1
].
sym
->
name
;
if
(
strncmp
(
sym
->
name
,
"__imp__"
,
7
)
==
0
)
name
=
&
sym
->
name
[
7
];
// __imp__Name => Name
else
if
(
sym
->
name
[
0
]
==
'_'
)
name
=
&
sym
->
name
[
1
];
// _Name => Name
else
{
name
=
sym
->
name
;
if
(
strncmp
(
name
,
"__imp_"
,
6
)
==
0
)
name
=
&
name
[
6
];
// __imp_Name => Name
if
(
thechar
==
'8'
&&
name
[
0
]
==
'_'
)
name
=
&
name
[
1
];
// _Name => Name
}
// remove last @XXX
p
=
strchr
(
name
,
'@'
);
if
(
p
)
...
...
@@ -443,8 +445,8 @@ readsym(PeObj *obj, int i, PeSym **y)
if
(
s
!=
nil
&&
s
->
type
==
0
&&
!
(
sym
->
sclass
==
IMAGE_SYM_CLASS_STATIC
&&
sym
->
value
==
0
))
s
->
type
=
SXREF
;
if
(
strncmp
(
sym
->
name
,
"__imp_
_"
,
7
)
==
0
)
s
->
got
=
-
2
;
// flag for __imp_
_
if
(
strncmp
(
sym
->
name
,
"__imp_
"
,
6
)
==
0
)
s
->
got
=
-
2
;
// flag for __imp_
sym
->
sym
=
s
;
return
0
;
...
...
src/pkg/runtime/cgo/amd64.S
View file @
e7042418
...
...
@@ -5,7 +5,7 @@
/*
*
Apple
still
insists
on
underscore
prefixes
for
C
function
names
.
*/
#if defined(__APPLE__)
|| defined(_WIN32)
#if defined(__APPLE__)
#define EXT(s) _##s
#else
#define EXT(s) s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment