Re: Problem Linking (win32)
- From: "Jim Carlock" <spamtrap@xxxxxxxxxx>
- Date: Thu, 24 Jul 2008 09:47:57 -0400
Jim Carlock wrote:
:
[snip]
:
<file name="nasm32.inc">
%imacro .CODE 0
[section .text]
%endmacro
</file>
:
[snip]
:
: Not sure why the bracketed notation occurs, or why it ends up
: preferred, so if someone has a comment on that, that would be nice.
"Frank Kotler" wrote...
: Since it isn't in *our* code, the linker must create it... or not.
: I've *only* seen this work using "-f obj" and Alink, but I think
: it's more a question of "which linker" than "which output format".
: Brian appears to be using it with GoLink, but there's some question
: if his code is "really" working right.
:
: (Or did you mean the brackets around "[section .text]"? That's the
: "raw" form, which doesn't set the "__SECT__" standard macro. Possibly
: intentional, in this case - usually you want the "user" form "section
: .text", which does set "__SECT__".)
Thanks for the comments, Frank. "raw" form does not mean much to me at
the moment, maybe because I'm not looking at the NASM source code.
[JC] How does one create a "%imacro .TEXT *" macro?
[FK] %imacro .TEXT 0-*
[FK] [section .text %1]
[FK] %endmacro
:
: The "-*" indicates a "greedy" parameter - everything after the zeroth
: (everything, IOW) is "lumped together" as "%1". I think that's what
: you have in mind. The "-" shouldn't be read as a minus sign, in this
: case - "%macro foo 1-3" means one through three parameters, not -1.
: "foo" with no, or more than 3, parameters won't match.
:
That's what I wanted to know. Thanks for the explanation. Maybe it's in
the documentation somewhere. There might be another word to describe that
character as well.
greedy, catchall, glob, asterisk, star
: Personally, I find listing files almost completely useless. The
: "addresses" aren't runtime addresses but mere file offsets, half
: the "code" is left to be filled in by the linker (might be useful
: for debugging Nasm, but if I cared what the opcode was I'd do it
: "Wolfgang style"), and the "source code"... well, I *knew* that.
: What's to like?
Did you miss the other post where I indicated that I'm not seeing the
%define expansions (in the listing file (.lst)). Is your Internet
connection ok? Your post went through twice. They looked the same and
I deleted the second post. Was that a mistake? I'm surprised Chuck let
it go through twice.
--
JC
Natural Cure For Pink-Eye (Conjunctivitis)
http://www.associatedcontent.com/article/381336/saliva_a_natural_cure_for_conjunctivitis.html
Childhood Obesity Caused By Canola Oil Consumption?
Article Coming
.
- Follow-Ups:
- Re: Problem Linking (win32)
- From: Frank Kotler
- 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
- Re: Problem Linking (win32)
- From: Frank Kotler
- Problem Linking (win32)
- Prev by Date: Re: Atomic operations in 32 and 64 bit platforms
- Next by Date: Re: 32-bit drivers, 64-bit OS
- Previous by thread: Re: Problem Linking (win32)
- Next by thread: Re: Problem Linking (win32)
- Index(es):
Relevant Pages
|