Author Topic: Format elf32: flat memory model?  (Read 2615 times)

Offline STF92

  • Jr. Member
  • *
  • Posts: 10
Format elf32: flat memory model?
« 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.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2437
  • Country: us
Re: Format elf32: flat memory model?
« Reply #1 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


Offline STF92

  • Jr. Member
  • *
  • Posts: 10
Re: Format elf32: flat memory model?
« Reply #2 on: July 13, 2011, 04:36:04 AM »
Thanks for your kind reply.