N
N
nikitin72016-08-21 22:18:44
Windows
nikitin7, 2016-08-21 22:18:44

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 answer(s)
M
Mikhail Usotsky, 2016-08-22
@Aquarius-Michael

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. ae48911f15de4bf69ff19d90dd786df2.jpg
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 question

Ask a Question

731 491 924 answers to any question