I know that generally speaking data segments in x86 can overlap but can the stack and data segments overlap I am asking this cause generally they are quiet far from each other in illustration of data segments
Asked
Active
Viewed 328 times
0
-
Really? According to [some random picture I searched up](http://www.tenouk.com/ModuleZ.html) (heading "Z.3") the two segments are very near each other, with only BSS in between. – Kerrek SB Oct 15 '14 at 09:43
-
"Segments" are an implementation detail of 8086 Real Mode. An ancient detail that I gladly forgot about 20 years ago but that keeps coming back in SO questions. Sure, they can overlap on a 16-bit OS, or a bootloader. – Hans Passant Oct 15 '14 at 10:28
1 Answers
0
Barbara,
In short, yes they can overlap quite easily. Any segment can overlap another segment. Please refer to this explanation for details explaining segmentation, it describes how they can overlap.

Davan Etelamaki
- 181
- 1
- 4