On Sun, Jul 17, 2011 at 1:24 AM, Vaibhav Jain <vjoss197@xxxxxxxxx> wrote: > Thanks a lot Joel! This is a great explanation. > Just one more question. I used to think that the compiler always > assigns/generates starting from 0 as Mulyadi has also mentioned. > In the case when Segmentation(intel-style) is being used how does the > compiler assigns > addresses? > The compiler just generates code as if segmentation is not being used.I'm not familiar with segmentation in x86 Protected mode. Further because Linux doesn't uses segmentation (the logical addresses are one-to-one mapped to virtual addresses) so neither have I really cared about how it works ;) The compiler just generates code as if segmentation is not being used. But I'd say some google searches on "Global Descriptor Table" would give you some pointers. You shouldn't worry about segmentation too much because virtual addressing achieves everything it does and is more flexible. I'd say ignore segmentation and focus on paging. :) Thanks, Joel _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies