How does Win32 implement assembly language sections?
From: William Hayes (whayes_at_hfx.andara.com)
Date: 09/27/04
- Previous message: John Found: "Re: Catagories of Assembly Languages"
- Next in thread: Randall Hyde: "Re: How does Win32 implement assembly language sections?"
- Reply: Randall Hyde: "Re: How does Win32 implement assembly language sections?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Sep 2004 15:34:55 -0300
Hello,
How are the sections defined in an assembly language program (e.g., .CODE,
.DATA, .CONST, etc.) implemented under the Win32 flat memory model? I am
aware that programmers don't have to concern themselves with segmentation,
but I am curious about it's possible role behind the scenes.
>From what I have read in this newsgroup and elsewhere, it looks like .CODE
and .DATA sections end up as separate segments (even though their base
address and limit are the same), with different access rights in their
segment descriptors. Is that the case? Are the other pre-defined sections
merged into those two segments (e.g., .CONST into the code segment, .DATA?
into the data segment, and so on)?
What about other sections defined using the SEGMENT directive? Are they
always merged with the existing code or data segment?
If the stack and the data section share a segment (SS and DS seem to hold
the same selector), and therefore have the same access rights, base address,
and limit, is there anything preventing accidental stack overwriting?
Thanks.
William Hayes
- Previous message: John Found: "Re: Catagories of Assembly Languages"
- Next in thread: Randall Hyde: "Re: How does Win32 implement assembly language sections?"
- Reply: Randall Hyde: "Re: How does Win32 implement assembly language sections?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|