Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1148)

Issue 2166041: code review 2166041: 8l : add dynimport to import table in Windows PE, initi... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 8 months ago by vcc
Modified:
14 years, 5 months ago
Reviewers:
CC:
rsc, brainman, Joe Poirier, mattn, golang-dev
Visibility:
Public.

Description

8l : add dynimport to import table in Windows PE, initial make cgo dll work.

Patch Set 1 #

Patch Set 2 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 3 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 4 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 5 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 6 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 7 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 16

Patch Set 8 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 20

Patch Set 9 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 10 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 11 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 12 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 5

Patch Set 13 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 6

Patch Set 14 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 15 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 16 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 6

Patch Set 17 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 13

Patch Set 18 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Total comments: 5

Patch Set 19 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Patch Set 20 : code review 2166041: 8l : add dynimport to import table in Windows PE, initi... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -133 lines) Patch
M src/cmd/8l/asm.c View 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8l/l.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8l/obj.c View 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/ld/pe.h View 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/ld/pe.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +162 lines, -49 lines 0 comments Download
M src/pkg/runtime/windows/386/sys.s View 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -8 lines 0 comments Download
M src/pkg/runtime/windows/mem.c View 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/runtime/windows/os.h View 1 chunk +0 lines, -8 lines 0 comments Download
M src/pkg/runtime/windows/thread.c View 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +35 lines, -68 lines 0 comments Download

Messages

Total messages: 50
vcc
Hello rsc, brainman (cc: golang-dev@googlegroups.com, vcc), I'd like you to review this change.
14 years, 8 months ago (2010-09-06 14:55:47 UTC) #1
brainman
> I'd like you to review this change. The code looks good. But I can't ...
14 years, 8 months ago (2010-09-06 23:50:49 UTC) #2
vcc
add export variable support, please take another look. for run cgo test it, need more ...
14 years, 8 months ago (2010-09-07 14:51:07 UTC) #3
Joe Poirier
On Tue, Sep 7, 2010 at 9:51 AM, Wei guangjing <vcc.163@gmail.com> wrote: > add export ...
14 years, 8 months ago (2010-09-08 17:12:15 UTC) #4
vcc
Add dynimport kernel32.dll fundctions into runtime, so don't need get process address on init, please ...
14 years, 7 months ago (2010-09-18 03:45:36 UTC) #5
brainman
On 2010/09/18 03:45:36, vcc wrote: > Add dynimport kernel32.dll fundctions into runtime, so don't need ...
14 years, 7 months ago (2010-09-18 06:20:46 UTC) #6
vcc
handle in windows_goargs, please take another look. On 2010/09/18 06:20:46, brainman wrote: > Why didn't ...
14 years, 7 months ago (2010-09-22 02:34:35 UTC) #7
brainman
On 2010/09/22 02:34:35, vcc wrote: > handle in windows_goargs, please take another look. > Russ, ...
14 years, 7 months ago (2010-09-22 02:59:23 UTC) #8
rsc
It seems like something we'll need eventually. Thanks for figuring out how to do it, ...
14 years, 7 months ago (2010-09-22 03:14:48 UTC) #9
vcc
Done, please take another look. On 2010/09/22 03:14:48, rsc wrote: > It seems like something ...
14 years, 7 months ago (2010-09-22 07:51:13 UTC) #10
rsc1
looks pretty good; a few more small things http://codereview.appspot.com/2166041/diff/27001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): http://codereview.appspot.com/2166041/diff/27001/src/cmd/ld/pe.c#newcode136 src/cmd/ld/pe.c:136: struct ...
14 years, 7 months ago (2010-09-22 18:46:43 UTC) #11
vcc
All done, please take another look. http://codereview.appspot.com/2166041/diff/27001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): http://codereview.appspot.com/2166041/diff/27001/src/cmd/ld/pe.c#newcode136 src/cmd/ld/pe.c:136: struct Imp { ...
14 years, 7 months ago (2010-09-23 09:02:57 UTC) #12
brainman
Russ, I need your help / opinion here. The way windows runtime loader works is, ...
14 years, 7 months ago (2010-09-28 05:49:00 UTC) #13
brainman
Lots of comments, but, most importantly, it works, which is a always a good start! ...
14 years, 7 months ago (2010-09-28 05:53:31 UTC) #14
Joe Poirier
On Tue, Sep 28, 2010 at 12:49 AM, <alex.brainman@gmail.com> wrote: > Russ, > > I ...
14 years, 7 months ago (2010-09-28 11:01:59 UTC) #15
rsc
> The way windows runtime loader works is, it gets list of function names > ...
14 years, 7 months ago (2010-09-28 14:10:56 UTC) #16
vcc
On 2010/09/28 11:01:59, Joe Poirier wrote: > It may be worth while to look at ...
14 years, 7 months ago (2010-09-28 15:28:43 UTC) #17
brainman
> ... If you look at how the data gets laid out (dodata) > you ...
14 years, 7 months ago (2010-09-28 23:19:49 UTC) #18
brainman
Sorry, one more. http://codereview.appspot.com/2166041/diff/32001/src/pkg/runtime/windows/thread.c File src/pkg/runtime/windows/thread.c (right): http://codereview.appspot.com/2166041/diff/32001/src/pkg/runtime/windows/thread.c#newcode16 src/pkg/runtime/windows/thread.c:16: #pragma dynimport VirtualFree VirtualFree "kernel32.dll" These ...
14 years, 7 months ago (2010-09-28 23:38:47 UTC) #19
vcc
2010/9/29 <alex.brainman@gmail.com> > ... If you look at how the data gets laid out (dodata) ...
14 years, 7 months ago (2010-09-29 03:13:47 UTC) #20
vcc
For avoid JMP table, we need can direct call dynimport function in Go first, otherwise ...
14 years, 7 months ago (2010-09-30 05:15:27 UTC) #21
brainman
> For avoid JMP table, we need can direct call dynimport function in Go first, ...
14 years, 7 months ago (2010-09-30 05:44:03 UTC) #22
vcc
2010/9/30 <alex.brainman@gmail.com> > ... > The benefit is exactly what you said. Assuming it is ...
14 years, 7 months ago (2010-09-30 09:30:38 UTC) #23
brainman
On 2010/09/30 09:30:38, vcc wrote: > > ... I'd like to suggest use compiler handle ...
14 years, 7 months ago (2010-09-30 23:05:23 UTC) #24
vcc
Don't use JMP table now, thanks Alex and Russ, please take another look. http://codereview.appspot.com/2166041/diff/32001/src/cmd/ld/pe.c File ...
14 years, 7 months ago (2010-10-01 03:54:33 UTC) #25
brainman
On 2010/10/01 03:54:33, vcc wrote: > Don't use JMP table now, ... Good work. But ...
14 years, 7 months ago (2010-10-05 02:00:12 UTC) #26
vcc
Make code a bit simple. Thanks for review, please take another look. On 2010/10/05 02:00:12, ...
14 years, 6 months ago (2010-10-12 15:49:18 UTC) #27
brainman
On 2010/10/12 15:49:18, vcc wrote: > > ... > > + /* allocate block for ...
14 years, 6 months ago (2010-10-12 23:59:21 UTC) #28
vcc
On 2010/10/12 23:59:21, brainman wrote: > > No, you should not need anything else. Just ...
14 years, 6 months ago (2010-10-16 06:35:30 UTC) #29
vcc
update code, please take another look. Thanks for review, please consider submit this CL, so ...
14 years, 6 months ago (2010-10-16 06:39:02 UTC) #30
mattn
Hmm, It seems that patch above is bits old? I got an error while applying ...
14 years, 6 months ago (2010-10-29 06:31:11 UTC) #31
vcc
2010/10/29 <mattn.jp@gmail.com> > Hmm, It seems that patch above is bits old? > I got ...
14 years, 6 months ago (2010-10-29 09:01:39 UTC) #32
rsc1
http://codereview.appspot.com/2166041/diff/70001/src/cmd/ld/data.c File src/cmd/ld/data.c (right): http://codereview.appspot.com/2166041/diff/70001/src/cmd/ld/data.c#newcode691 src/cmd/ld/data.c:691: /* allocate FirstThunk block for windows dynimport vars */ ...
14 years, 6 months ago (2010-11-01 21:50:44 UTC) #33
vcc
2010/11/2 <rsc@google.com> > > http://codereview.appspot.com/2166041/diff/70001/src/cmd/ld/data.c > File src/cmd/ld/data.c (right): > > > http://codereview.appspot.com/2166041/diff/70001/src/cmd/ld/data.c#newcode691 > src/cmd/ld/data.c:691: ...
14 years, 6 months ago (2010-11-02 15:34:21 UTC) #34
rsc
The address assignment code where you added the special case for Windows should be general ...
14 years, 6 months ago (2010-11-02 16:07:21 UTC) #35
vcc
Move dynamic import address assignment code into pe.c, don't touch dodata anymore, please take another ...
14 years, 6 months ago (2010-11-04 18:02:12 UTC) #36
rsc1
definitely better, thanks. https://codereview.appspot.com/2166041/diff/80001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): https://codereview.appspot.com/2166041/diff/80001/src/cmd/ld/pe.c#newcode151 src/cmd/ld/pe.c:151: int i; Sym *dynamic; dynamic = ...
14 years, 6 months ago (2010-11-04 18:10:13 UTC) #37
brainman
On 2010/11/04 18:02:12, vcc wrote: > Move dynamic import address assignment code into pe.c, don't ...
14 years, 6 months ago (2010-11-04 22:33:26 UTC) #38
vcc
All done, thanks Russ, please take another look. http://codereview.appspot.com/2166041/diff/70001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): http://codereview.appspot.com/2166041/diff/70001/src/cmd/ld/pe.c#newcode135 src/cmd/ld/pe.c:135: peInitDynimport() ...
14 years, 6 months ago (2010-11-05 09:19:24 UTC) #39
rsc1
looks good; just a few things below http://codereview.appspot.com/2166041/diff/94001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): http://codereview.appspot.com/2166041/diff/94001/src/cmd/ld/pe.c#newcode145 src/cmd/ld/pe.c:145: initdynimport() s/()/(void)/ ...
14 years, 6 months ago (2010-11-05 15:58:47 UTC) #40
vcc
Thanks for review, please take another look. http://codereview.appspot.com/2166041/diff/94001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): http://codereview.appspot.com/2166041/diff/94001/src/cmd/ld/pe.c#newcode145 src/cmd/ld/pe.c:145: initdynimport() On ...
14 years, 6 months ago (2010-11-05 16:35:27 UTC) #41
brainman
You are getting there. Please check files you send for review. I suspect they all ...
14 years, 6 months ago (2010-11-09 04:00:05 UTC) #42
vcc
Please take another look. http://codereview.appspot.com/2166041/diff/86002/src/cmd/8l/obj.c File src/cmd/8l/obj.c (right): http://codereview.appspot.com/2166041/diff/86002/src/cmd/8l/obj.c#newcode324 src/cmd/8l/obj.c:324: dope(); On 2010/11/09 04:00:06, brainman ...
14 years, 5 months ago (2010-11-15 12:53:55 UTC) #43
brainman
You've ignored all (but one) my comments! But never mind that, I'll try to do ...
14 years, 5 months ago (2010-11-16 03:51:50 UTC) #44
vcc
Please take another look. I also convert pe.c to LF format, every time after do ...
14 years, 5 months ago (2010-11-16 05:42:05 UTC) #45
brainman
http://codereview.appspot.com/2166041/diff/109001/src/cmd/ld/pe.c File src/cmd/ld/pe.c (right): http://codereview.appspot.com/2166041/diff/109001/src/cmd/ld/pe.c#newcode322 src/cmd/ld/pe.c:322: d = addpesection(".data", segdata.len, segdata.len, &segdata); On 2010/11/16 05:42:06, ...
14 years, 5 months ago (2010-11-16 05:58:10 UTC) #46
vcc
Done, please take another look. On 2010/11/16 05:58:10, brainman wrote: > http://codereview.appspot.com/2166041/diff/109001/src/cmd/ld/pe.c > File src/cmd/ld/pe.c ...
14 years, 5 months ago (2010-11-16 12:27:29 UTC) #47
brainman
LGTM. Leaving for Russ to OK. Thank you. It was a big job!
14 years, 5 months ago (2010-11-16 23:25:28 UTC) #48
rsc
LGTM Thanks. I bet my upcoming cgo changes will break this but after that there ...
14 years, 5 months ago (2010-12-07 18:43:11 UTC) #49
rsc
14 years, 5 months ago (2010-12-07 20:28:36 UTC) #50
*** Submitted as f5ea1dcf89ae ***

8l : add dynimport to import table in Windows PE, initial make cgo dll work.

R=rsc, brainman, Joe Poirier, mattn
CC=golang-dev
http://codereview.appspot.com/2166041

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b