Answer the question
In order to leave comments, you need to log in
Do modern operating systems ignore segment addressing in 32-bit compatibility mode?
Hey Toaster. I read on the Internet that modern operating systems ignore segment translation.
1. How true is this for Linux and Win NT 10?
2. They write that sections in PE replace segments when displaying an image. It turns out that the section addresses are not written to any registers when loaded into memory?
3. And if I write an assembly language program using registers for this selector translation, then my application will not be correctly executed in such a system, or how is this allowed?
Answer the question
In order to leave comments, you need to log in
1. Yes, modern operating systems ignore segment organization in favor of a flat, paginated memory model. But left a couple of segments for virtual machines. This is the end of the matter. Segmented memory organization was good in those days when you need to address memory more than a 16-bit processor allows. In addition, the flat memory model is more convenient and easier to port applications to different architectures.
2. PE is, in fact, the structure of the program itself during loading, it tells the operating system what and where to place in memory and what to load. Something like a translation table.
Linux uses the ELF format, if I'm not mistaken.
3. For guaranteed operation of the application in the system, conventions and recommendations are usually used. On a 32-bit system, you can still access them. But it's better not to touch them. Because no one knows the consequences. But at the level of systems programming, knowledge can be very useful, especially in the field of security. But in a 64-bit system, they are turned off except for a couple of segment registers for the context.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question