flat assembler
Message board for the users of flat assembler.
Index
> Windows > reloc, fixups, and some other questions... |
Author |
|
vid 15 Dec 2006, 02:01
fixups are needed in DLL files. EXE files are always loaded at address 400000h. DLL files can be loaded anywhere, so the code inside them need to be "relocated". "fixups" flag says fasm to declare relocation data for you
|
|||
15 Dec 2006, 02:01 |
|
kohlrak 15 Dec 2006, 04:39
So is there any point to putting executable as a flag to a section that's executed?
|
|||
15 Dec 2006, 04:39 |
|
vid 15 Dec 2006, 11:32
yes, processor allows you to protect some paga against executing. Sections marked as "executable" can be executed, and other can't. But unfortunatelly most processors today doesn't support this feature
|
|||
15 Dec 2006, 11:32 |
|
kohlrak 15 Dec 2006, 20:49
Paga?
|
|||
15 Dec 2006, 20:49 |
|
LocoDelAssembly 15 Dec 2006, 21:10
pages
|
|||
15 Dec 2006, 21:10 |
|
kohlrak 15 Dec 2006, 21:12
So, i'm assuming that as long as i stick with the 80x86 systems, i don't NEED the executable, but for some odd reson it's included in many sources anyway?
|
|||
15 Dec 2006, 21:12 |
|
vid 15 Dec 2006, 22:12
you are assuming wrong.
http://en.wikipedia.org/wiki/NX_bit |
|||
15 Dec 2006, 22:12 |
|
kohlrak 16 Dec 2006, 03:18
Which means.... I have to start putting my variables in seperate sections adding another 1024 byte (at the least) to my code... Will i have to worry about this when i'm codding in a no OS invironment to make a kernel, or does the processor use this function without the request of the OS?
|
|||
16 Dec 2006, 03:18 |
|
vid 17 Dec 2006, 02:14
Quote: 1024 byte (at the least) to my code... more precisely: at most 4095 you can keep variables in same section as code, you just have to declater it as "readable" and "writeable" |
|||
17 Dec 2006, 02:14 |
|
kohlrak 17 Dec 2006, 03:56
executable and writeable conflict. if you include executable, you can't have it writeable, unless you found a way to do otherwise, last time i tried it i got an error, but i'll try again real quick.
EDIT: Odd, it's working now. Any time before now and it crashed the program with an access violation... |
|||
17 Dec 2006, 03:56 |
|
ACP 23 Dec 2006, 21:48
If you need to modify anything within executable pages area of your module, than you can use VirtualProtect function to make it writable:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtualprotect.asp Secondly to clear things up a bit: ImageBase can be setup to other value than 400000 but usually there is no point in doing it. |
|||
23 Dec 2006, 21:48 |
|
f0dder 24 Dec 2006, 21:06
Executable and writable don't conflict.
But don't keep writable data near your code - it can give massive slowdowns on some processors. So, be smart and safe, and use separate .data and .text sections, unless you're writing 4k intros. |
|||
24 Dec 2006, 21:06 |
|
kohlrak 27 Dec 2006, 05:37
Yea, after some rechecking apparently i must have spelled it wrong or something, because before they did conflict.
|
|||
27 Dec 2006, 05:37 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.