> I need clarification to a particular gnu assembly question. When i > write a code: > > .section .data > output: > .int 1 > > .section .text > .globl _start > _start: > movl $output, %ebx > .... > > here what type of memory model is used for movl statement(flat or > segmented)? I suppose that depends on your target platform. Since you sent this to linux-assembly, I'm going to assume that the answer is "flat". For all practical purposes, there is no "segmented" memory model on 32-bit x86 linux. > Also how does movl knows which logical address to use? I mean how do > variables get their logical address? The linker is generally responsible for assigning actual addresses. (The assembler can't do this because it doesn't know what other object files will go into the final executable.) b - To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- Follow-Ups:
- Re: Segmented or Flat model
- From: A D
- Re: Segmented or Flat model
- References:
- Segmented or Flat model
- From: A D
- Segmented or Flat model
- Prev by Date: Segmented or Flat model
- Next by Date: Re: Segmented or Flat model
- Previous by thread: Segmented or Flat model
- Next by thread: Re: Segmented or Flat model
- Index(es):