I've been playing around with GoLink and I'm still a bit miffed that the author seems to have thought of everything but DEF files. So I came up with a simple solution, this is aimed at RadASM users but can probably be adapted to any use.

I have made a wrapper for GoLink called GoDLink. Simply it is called with the exact same parameters as GoLink with one exception, it accepts a /DEF:$6. The wrapper strips this out of the command line and reads the def file, it adjusts the command line by adding /EXPORTS xxxx then calls GoLink with the modified command line. The wrapper is transparent to both GoLink and RadASM, it pipes all GoLinks output back to RadASM as if it wasn't there.

DEF files have the simplest possible structure. Just a list (one per line) of exports, no keywords,no holes,no blank lines e.g.

--------------top of file
Export1
Export2
Export3
--------------bottom of file

Change the link option in Project Options to :

7,O,$B\GoDLink @$B\GFL.txt /DEF:$6 /dll /entry DllEntryPoint,3

I would appreciate it if some FASM/RadASM users could test this for me
Posted on 2003-05-10 02:46:56 by donkey
Oh,and I spotted an error in the FASM.INI file I posted, the following change (indicated in red) should be made:
[DLL]

Files=1,1,1,0,1,0
Folders=1,0,0
MenuMake=0,1,1,1,0,0,0,0
;x=FileToDelete/CheckExistsOnExit,
;(O)utput/(C)onsole/0,Command,
;MakeFile1[,MakeFile2[,MakeFile3...]]
1=4,O,$B\GORC.EXE [color=red][b]/r,1[/b][/color]
2=3,O,$A\FASM.EXE,2,3
3=[color=red][b]7[/b][/color],O,$B\GoLink.EXE @$B\GFL.txt /EXPORTS /dll /entry DllEntryPoint ,3
4=0,0,,5
5=
6=
11=4,O,$B\GORC.EXE [color=red][b]/r,1[/b][/color]
12=3,O,$A\FASM.EXE,2,3
13=[color=red][b]7[/b][/color],O,$B\GoLink.EXE @$B\GFL.txt /EXPORTS /debug coff /dll /entry DllEntryPoint ,3
14=0,0,,5
15=
16=
Posted on 2003-05-10 02:57:34 by donkey
With GoLink 2.1a you can now use multiple command files. Using the following set up command;

7,OT,$B\GoLink @$B\GFL.txt @$6 /dll /entry DllEntryPoint,3

You can create a def file as follows and have the exports properly processed. This is much better than using the wrapper function.

-------------top of file
/export export1
/export export2
/export export3
-------------bottom of file

or

-------------top of file
/exports export1,export2
/export export3
-------------bottom of file

Change the DLL section of FASM.INI to the following:


Files=1,1,1,0,1,0
Folders=1,0,0
MenuMake=0,1,1,1,0,0,0,0
;x=FileToDelete/CheckExistsOnExit,
;(O)utput/(C)onsole/0,Command,
;MakeFile1[,MakeFile2[,MakeFile3...]]
1=4,O,$B\GORC.EXE /r,1
2=3,O,$A\FASM.EXE,2,3
3=7,OT,$B\GoLink @$B\GFL.txt @$6 /dll /entry DllEntryPoint,3
4=0,0,,5
5=
6=
11=4,O,$B\GORC.EXE /r,1
12=3,O,$A\FASM.EXE,2,3
13=7,OT,$B\GoLink @$B\GFL.txt @$6 /dll /entry /debug coff DllEntryPoint,3
14=0,0,,5
15=
16=
Posted on 2003-05-11 15:46:14 by donkey
Um .. this version was just for testing with more than one command file, but since it seems to work ok, I'm attaching it now
Posted on 2003-05-11 16:37:52 by jorgon