NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: STF92 on July 13, 2011, 01:21:23 AM

Title: Format elf32: flat memory model?
Post by: STF92 on July 13, 2011, 01:21:23 AM
Nasm 2.09.09

Hi:
When I specify -f elf32 in the command line, does nasm assume the memory model is the flat memory model? Perhaps I must add that I assemble under Linux kernel 2.6.21.5.

So, I would never have to worry about initializing segment registers? Regards.
Title: Re: Format elf32: flat memory model?
Post by: Frank Kotler on July 13, 2011, 04:30:03 AM
I believe that's correct, yes. Maybe an exception for fs(?) for "thread local storage"(?). I'm currently still running a 2.4 kernel, which doesn't know about that, but I think I recall reading something about it. I think it was originally gs, but changed to fs(?). In any case, "normally" we can forget that segment registers exist (with great relief!). Get back to us if you run into any trouble with that assumption.

Best,
Frank

Title: Re: Format elf32: flat memory model?
Post by: STF92 on July 13, 2011, 04:36:04 AM
Thanks for your kind reply.