Windows EXE linker

J

Jens Kallup

Hello Newsgroup,

I had program a little tool, thats output some assembler output:

---
.section .rdata, "dr"
LC1:
.ascii "eins: %g\0"
..text
..globl _dbase_main
_dbase_main:
pushl %ebp
movl %esp, %ebp
fldz
fstpl _f
fldl _bmodal
fstpl 4(%esp)
movl $LC1
call _printf
leave
ret

..comm _bmodal, 16 # 8
..comm _f, 16 # 8
---

the compilation into object file is working fine.
But how can I link the .o file to a working .exe
file?
It should be able to link to DOS/GUI (win32) exe.

Thanks for helping
Jens
 
M

Malcolm McLean

Jens Kallup said:
I had program a little tool, thats output some assembler output:

---
.section .rdata, "dr"
LC1:
.ascii "eins: %g\0"
.text
.globl _dbase_main
_dbase_main:
pushl %ebp
movl %esp, %ebp
fldz
fstpl _f
fldl _bmodal
fstpl 4(%esp)
movl $LC1
call _printf
leave
ret

.comm _bmodal, 16 # 8
.comm _f, 16 # 8
---

the compilation into object file is working fine.
But how can I link the .o file to a working .exe
file?
It should be able to link to DOS/GUI (win32) exe.
We don't deal with platform -specific matters here, nor assembler.

However object or .o / .obj files are a common intermediate. If you can coax
an assembler into producing a conforming .o file then you ought to be able
to link it to other C-derived .o files using the linker. However you are
unlikely to be able to link it in to an executable file.
 
F

Flash Gordon

Jens Kallup wrote, On 11/02/07 16:42:
Hello Newsgroup,

I had program a little tool, thats output some assembler output:

the compilation into object file is working fine.
But how can I link the .o file to a working .exe
file?
It should be able to link to DOS/GUI (win32) exe.

Using whatever linker came with your compiler. This has nothing to do
with the C programming language and everything to do with your tool set.
Read the instructions for your tools and ask in whatever groups and
mailing lists exist to support them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,627
Members
45,328
Latest member
66Teonna9

Latest Threads

Top