473,465 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Windows EXE linker

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
Feb 11 '07 #1
2 2047

"Jens Kallup" <jk*****@web.dewrote in message n
>
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.
Feb 11 '07 #2
Jens Kallup wrote, On 11/02/07 16:42:
Hello Newsgroup,

I had program a little tool, thats output some assembler output:
<snip>
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.
--
Flash Gordon
Feb 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Christos TZOTZIOY Georgiou | last post by:
Last night I was compiling the latest python snapshot at my home Linux system (a K6-III @420 --the extra 20 Hz is overclocking :); then I tried building a shared version of the interpreter. I did...
2
by: Pankaj Bhagat | last post by:
Hi, This is in context with compiler and linker Can someone let me know 1) what is a binder? where is it needed? What does it do in a compiling process? ----------------- 2) When I have a...
10
by: Claudio Neri | last post by:
Hi everybody, I'm Claudio from Rome. I'm developying in Cfor univeristy and I have to transfrm a *nix chat server to a win chat server. I tryed to change the incudes at the top of the source and...
3
by: Steve Baer | last post by:
I recently read your whitepaper under the "extremely long link times" post and have a question that I was hoping you could answer. My question is based on the following paragraph: Directives...
3
by: Gustavo L. Fabro | last post by:
Greetings! I'm a newbie in Visual C++ .NET (have programmed in Borland C++ and Builder for long) and I am trying to do a very simple thing, but I'm stuck. I created an (unmanaged) DLL project...
5
by: quortex | last post by:
Hi all, I have a class which contains a method called GetMessage(). When I compile and unit test it all is well. However in the application I want to use it in there appears to be a conflict...
2
by: mshngo | last post by:
Hi, I am having the following trouble in compiling DLL on windows. Suppose I want to compile module A into a DLL library, and I want to declare an external interger n in A. My intention is to...
6
by: ulillillia | last post by:
I've been following the tutorial here to learn Windows programming (along with the help file from the Windows Platform SDK): http://www.cprogramming.com/tutorial/opengl_windows_programming.html ...
2
by: Oneironaut | last post by:
Hello friends, I have an issue with a linker warning. It is the warning LNK4089. I am working in MSVC6.0 I investigated and this warning tells that the import of the library to which it makes...
4
by: shailesh333 | last post by:
#include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <Winsock2.h> #include <stdlib.h> #define PORTNUM 2343 int main(int argc, char *argv)
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.