История изменений
Исправление AKonia, (текущая версия) :
На уровне целеполагания нет, т.к.
Without dynamic linking, all programs would need their own copy of the these libraries and would need far more disk space and virtual memory. In dynamic linking, information is included in the ELF image’s tables for every library routine referenced. The information indicates to the dynamic linker how to locate the library routine and link it into the program’s address space.
А детали реализации - это детали реализации, ссылатся на которые нельзя, т.к. могут везде быть разными, т.к. везде разные и не поверите, но и на сисетмах без отображения в память разделяемые библиотеки не копируются к вап процессов, а отсылать к деталям реализации некорректно, т.к. описанный вами сценарий работает в случае MMU.
Что пишет Левин:
Linux adds a single
uselib ()
system call that takes the file name and address of a library and maps it into the program address space. The startup routine bound into the executable runs down the list of libraries, doing auselib()
on each. The BSD/OS scheme uses the standardmmap ()
system call that maps pages of a file into the address space and a bootstrap routine that is linked into each shared library as the first thing in the library.
Т.е. отображение в вап без копирования, т.е. опять же физического копирования не происходит идёт лишь подстройка для ВАП и в целом физического копирования и не будет, а mmap не оптимизация копирования, а вариант реализации адресного отображения.
Исправление AKonia, :
На уровне целеполагания нет, т.к.
Without dynamic linking, all programs would need their own copy of the these libraries and would need far more disk space and virtual memory. In dynamic linking, information is included in the ELF image’s tables for every library routine referenced. The information indicates to the dynamic linker how to locate the library routine and link it into the program’s address space.
А детали реализации - это детали реализации, ссылатся на которые нельзя, т.к. могут везде быть разными, т.к. везде разные и не поверите, но и на сисетмах без отображения в память разделяемые библиотеки не копируются к вап процессов, а отсылать к деталям реализации некорректно, т.к. описанный вами сценарий работает в случае MMU.
Что пишет Левин:
Linux adds a single
uselib ()
system call that takes the file name and address of a library and maps it into the program address space. The startup routine bound into the executable runs down the list of libraries, doing auselib()
on each. The BSD/OS scheme uses the standardmmap ()
system call that maps pages of a file into the address space and a bootstrap routine that is linked into each shared library as the first thing in the library.
Т.е. отображение в вап без копирования, т.е. опять же физического копирования не происходит идёт лишь подстройка для ВАП и в целом физического копирования и не будет. А от возможного физического копирования отказались ещё в POSIX 2001, т.е. оно не ссответсвует стандартам, а mmap не оптимизация копирования, а вариант реализации адресного отображения.
Исходная версия AKonia, :
На уровне целеполагания нет, т.к.
Without dynamic linking, all programs would need their own copy of the these libraries and would need far more disk space and virtual memory. In dynamic linking, information is included in the ELF image’s tables for every library routine referenced. The information indicates to the dynamic linker how to locate the library routine and link it into the program’s address space.
А детали реализации - это детали реализации, ссылатся на которые нельзя, т.к. могут везде быть разными, т.к. везде разные и не поверите, но и на сисетмах без отображения в память разделяемые библиотеки не копируются к вап процессов, а отсылать к деталям реализации некорректно, т.к. описанный вами сценарий работает в случае MMU.
Что пишет Левин:
Linux adds a single
uselib ()
system call that takes the file name and address of a library and maps it into the program address space. The startup routine bound into the executable runs down the list of libraries, doing auselib()
on each. The BSD/OS scheme uses the standardmmap ()
system call that maps pages of a file into the address space and a bootstrap routine that is linked into each shared library as the first thing in the library.
Т.е. отображение в вап без копирования, т.е. опять же физического копирования не происходит идёт лишь подстройка для ВАП и в целом физического копирования и не будет.