Re: Jumping into middle of instruction
- From: "robertwessel2@xxxxxxxxx" <spamtrap@xxxxxxxxxx>
- Date: Fri, 29 Feb 2008 13:57:20 -0800 (PST)
On Feb 29, 7:08 am, NoS...@xxxxxxxxxxx (Bob Masta) wrote:
You can't direct write to CodeSeg in protected mode.
That may be true in some sense, but not as a practical
matter... it is easy to create apps with combined code+data
that allow you to write anywhere in your own program space.
I use a .data? (BSS) section for uninitialized data and a
..code section for everything else. The linker needs to have
/SECTION:.text,ERW to handle this properly.
Do remember that the big x86 OS's all use the page attributes to
prevent code from executing from data pages, and to prevent
modification of code pages. There is usually an OS API that can
modify that (for example, JIT compilers clearly need to be able to
generate code on the fly), but in general these days, you cannot self
modify code or generate new code without asking the OS's permission
first.
.
- References:
- Jumping into middle of instruction
- From: mybwpp@xxxxxxxxxxxxxx
- Re: Jumping into middle of instruction
- From: Wolfgang Kern
- Re: Jumping into middle of instruction
- From: mybwpp@xxxxxxxxxxxxxx
- Re: Jumping into middle of instruction
- From: Wolfgang Kern
- Re: Jumping into middle of instruction
- From: Bob Masta
- Re: Jumping into middle of instruction
- From: Wolfgang Kern
- Re: Jumping into middle of instruction
- From: Bob Masta
- Jumping into middle of instruction
- Prev by Date: Re: referring to segment offsets in read address mode
- Previous by thread: Re: Jumping into middle of instruction
- Next by thread: Re: Jumping into middle of instruction
- Index(es):
Relevant Pages
|