diff options
author | David 'Digit' Turner <digit@google.com> | 2012-06-18 18:13:49 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2012-06-25 11:52:40 +0200 |
commit | 23363ed7503c25ef4024ce0d517f7415c096645d (patch) | |
tree | 2892f3246f211cf3c5a4d17ecec3194d00294bda /linker/NOTICE | |
parent | a6545f46784e67edd5dbcd2bb714c60549f9192d (diff) | |
download | bionic-23363ed7503c25ef4024ce0d517f7415c096645d.zip bionic-23363ed7503c25ef4024ce0d517f7415c096645d.tar.gz bionic-23363ed7503c25ef4024ce0d517f7415c096645d.tar.bz2 |
linker: avoid mapping the whole library before load.
This patch changes the load_library() function in the
dynamic linker to avoid reserving a huge read-only
address-space range just to read the ELF header and
program header (which are typically very small and easily
fit in the first page).
Instead, we use the functions in linker_phdr.c to only
load the data that we need in a temporary mmap-allocated
page of memory, which we release when the function exits.
This avoids issues when loading very large libraries, or
simply debug versions that only need to load a tiny percentage
of their overall file content in RAM.
Change-Id: Id3a189fad2119a870a1b3d43dd81380c54ea6044
Diffstat (limited to 'linker/NOTICE')
0 files changed, 0 insertions, 0 deletions