Page 1 of 1
NASM => Is it possible to override linker usage ?
Posted: Sun Nov 21, 2010 11:53 pm
by osdevkid
Hi all,
Is it possible to override linker usage in NASM.
I mean, is it possible to specify data, code segment alignment and address in NASM itself.
Re: NASM => Is it possible to override linker usage ?
Posted: Mon Nov 22, 2010 12:24 am
by Hangin10
If you are not using a linker, why insist on using segments?
Just use the align directive before labels.
If you are using a linker, then no, that's the whole point of a linker.
Re: NASM => Is it possible to override linker usage ?
Posted: Mon Nov 22, 2010 12:34 am
by osdevkid
At first, thanks to your reply.
leave about segment.
I want to load all my data in memory location "X", and I want to load and run my code from memory location "Y", how to do it in NASM without linker.
My advance thanks for those who post some simple example for this.
Re: NASM => Is it possible to override linker usage ?
Posted: Mon Nov 22, 2010 2:45 am
by Solar
osdevkid wrote:I want to load all my data in memory location "X", and I want to load and run my code from memory location "Y", how to do it in NASM without linker.
The question is, why would you want to do that without a linker?
Could it be because you don't understand linkers and are afraid of them?
If your X and Y are adjacent to each other in memory, it should be blatantly obvious how to do it.
If they are seperate in memory, you
could hack your way around it in source, but all you'd do is mimic what the linker does for you anyway (meaning, you would have to understand what they do first, anyway).
My advance thanks for those who post some simple example for this.
Usually posting source is the worst way "explaining" something.
Re: NASM => Is it possible to override linker usage ?
Posted: Mon Nov 22, 2010 4:29 am
by osdevkid
Solar wrote:
Could it be because you don't understand linkers and are afraid of them?
Hi Solar,
Can you please recommend some good tutorial about Linker.
Re: NASM => Is it possible to override linker usage ?
Posted: Mon Nov 22, 2010 4:53 am
by f2
osdevkid wrote:Can you please recommend some good tutorial about Linker.
Maybe you need to read carefully the
NASM manual to know if you can do that...
Re: NASM => Is it possible to override linker usage ?
Posted: Mon Nov 22, 2010 6:20 am
by Combuster
osdevkid wrote:Can you please recommend some good tutorial about Linker.
Please, learn to
STFW.