Hi, I'm building a program on which I'm going to have a main source file, a few 3rd party MSCOFF files for which I do not have a source(hence, the need to use MSCOFF + polink) and, since I'm already using MSCOFF, I figured, why not make most the source base like low-level plugins; meaning, I just have a main source file, which includes a 'plugins.inc', file which would simply list all the "plugins" and call an startup function on all of them, this would in turn cause the plugins to register themselves within the application's "managers".
Doubts, following the MSCOFF example on FASM, I've got this bare bones source:
format MS COFF
include '../../include/win32a.inc'
extrn '__imp__MessageBoxA@16' as MessageBox:dword
section '.text' code readable executable
public start as "main"
start:
invoke MessageBox,0,_message,_caption,0
ret
section '.data' data readable writeable
_caption db 'Coff Coff',0
_message db 'Coffee time!',0
This, once assembled would be, say, main.obj; and I would link it with:
polink /SUBSYSTEM:WINDOWS /NODEFAULTLIB /ENTRY:main /RELEASE /OPT:NOWIN98 main.obj kernel32.lib user32.lib
So, what would be the structure of the other "plugin" .obj files? I mean, same sections and stuff? If so, will all those code and data sections merge in the final executable? I do not want to have an executable bloated with sections all over it ( as a matter of fact, since I'm programming in ASM, I want things to be as small and fast as inhumanly possible). If not, can you post an small example of what the other MSCOFF files would look like?
Thanks for you time.