Re: Problem Linking (win32)
- From: "bwaichu@xxxxxxxxx" <spamtrap@xxxxxxxxxx>
- Date: Wed, 23 Jul 2008 12:39:40 -0700 (PDT)
On Jul 23, 9:15 am, "Jim Carlock" <spamt...@xxxxxxxxxx> wrote:
Thanks for posting that, Frank. That helps, as I noticed that the
nasm32.inc encodes the following which demonstrates that you're
correct (I did not see Brian using an %include for that file):
I am not including any macros in my file. I'm using the latest
version
of nasm and the latest version of golink. I want to feel out NASM
some
more before I start to use macros. I'm just following the NASM manual
for the sections for win32 coff.
A consistent error occurs upon the loading of my asm. No error occurs
at loading if I leave out functions that link back to msvcrt.dll. I'm
not sure if this is a linking problem or a loading problem or
something else.
I do know that I do not have this problem when building with alink
and
OMF files.
Here's another example. This example results in this error being set
upon loading:
ERROR_ENVVAR_NOT_FOUND (000000CB)
And this happens every time. Check out the value of eax after
GetLastError is called. This could just be an issue with MS's loader
on xp.
;nasm -f win32 atext.asm
;golink /console atext.obj kernel32.dll user32.dll msvcrt.dll
extern printf
extern ExitProcess
extern GetLastError
section .text text CLASS=TEXT
global start
start:
call [GetLastError]
push dword sText
call printf
add esp, 4
push dword 0
call [ExitProcess]
section .data data CLASS=DATA
sText dd "Test", 0
Any ideas? Can you reproduce my error on your machines?
.
- Follow-Ups:
- Re: Problem Linking (win32)
- From: Frank Kotler
- Re: Problem Linking (win32)
- From: Jim Carlock
- Re: Problem Linking (win32)
- References:
- Problem Linking (win32)
- From: bwaichu@xxxxxxxxx
- Re: Problem Linking (win32)
- From: Frank Kotler
- Re: Problem Linking (win32)
- From: Jim Carlock
- Problem Linking (win32)
- Prev by Date: Re: Problem Linking (win32)
- Next by Date: Re: Atomic operations in 32 and 64 bit platforms
- Previous by thread: Re: Problem Linking (win32)
- Next by thread: Re: Problem Linking (win32)
- Index(es):
Relevant Pages
|