Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
5e4963d9
Commit
5e4963d9
authored
Oct 20, 2010
by
Alex Brainman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8l: fix windows build
R=rsc CC=golang-dev
https://golang.org/cl/2595041
parent
a9725396
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
pe.c
src/cmd/ld/pe.c
+8
-3
No files found.
src/cmd/ld/pe.c
View file @
5e4963d9
...
...
@@ -86,6 +86,7 @@ pewrite(void)
{
int
i
,
j
;
seek
(
cout
,
0
,
0
);
ewrite
(
cout
,
dosstub
,
sizeof
dosstub
);
strnput
(
"PE"
,
4
);
...
...
@@ -102,7 +103,7 @@ pewrite(void)
void
dope
(
void
)
{
textsect
=
new_section
(
".text"
,
textsize
,
0
);
textsect
=
new_section
(
".text"
,
segtext
.
len
,
0
);
textsect
->
Characteristics
=
IMAGE_SCN_CNT_CODE
|
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_EXECUTE
|
IMAGE_SCN_MEM_READ
;
...
...
@@ -167,7 +168,6 @@ add_import_table(void)
for
(
f
=
fs
;
f
->
name
;
f
++
)
f
->
thunk
+=
va
;
vlong
off
=
seek
(
cout
,
0
,
1
);
seek
(
cout
,
0
,
2
);
for
(
d
=
ds
;
;
d
++
)
{
lputl
(
d
->
OriginalFirstThunk
);
...
...
@@ -187,12 +187,13 @@ add_import_table(void)
lputl
(
f
->
thunk
);
strnput
(
""
,
isect
->
SizeOfRawData
-
size
);
cflush
();
seek
(
cout
,
off
,
0
);
}
void
asmbpe
(
void
)
{
vlong
eof
;
switch
(
thechar
)
{
default:
diag
(
"unknown PE architecture"
);
...
...
@@ -205,6 +206,10 @@ asmbpe(void)
break
;
}
// make sure the end of file is INITRND-aligned.
eof
=
seek
(
cout
,
0
,
2
);
strnput
(
""
,
rnd
(
eof
,
INITRND
)
-
eof
);
add_import_table
();
fh
.
NumberOfSections
=
nsect
;
...
...
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