hi!
i have one question about entry point of fresh compiled programs in masm32
as all people know 99% compiled programs have entry point on offset 00401000....
is there any posibility to when i write my code and compile to be for example 00402000 or something like this?
thanks!
To my knowledge there really isn't a way to tell the linker, "I want the entry point to be right... there!" You might play with the entry switch though and if you just don't want the entry point to be at 401000 you could always change the image base.
You can add some code (procedures) before the start: label.
I can't see any point in changing the entry point though.
Quoteif you just don't want the entry point to be at 401000 you could always change the image base.
yeah but when i change image base my aplication then crash :(
Why would you want to do this? Changing the entry point won't affect anything in code you've compiled yourself.
Bonobo is right though, putting code before your entry label will move it away from the default 401000.
Cheers,
Zooba :U
QuoteWhy would you want to do this? Changing the entry point won't affect anything in code you've compiled yourself.
yes i know that will not affect but i am just interesting is there posibility to do this :)
QuoteBonobo is right though, putting code before your entry label will move it away from the default 401000.
Yes its work i am also try this, but i am thinking myself is there any other way to do this job
AFAIK, re-basing is the best way to move it far away. Moving it a few bytes is probably best done with 'NOP's or 'DB 0'
org 0C0DEh-1000h
start:
.../BASE:0xBAD0000...
everything works ok. :)
thank you drizz you are the man :U