History log of /bionic/linker/linker_allocator.cpp
Revision Date Author Comments
7b0af7ad82fcf88e800d1a553d81fda29dc064bd 16-Sep-2017 Elliott Hughes <enh@google.com> Always log errno when aborting.

(Where errno is relevant.)

Also consistently use -1 as the fd for anonymous mmaps. (It doesn't matter,
but it's more common, and potentially more intention-revealing.)

Bug: http://b/65608572
Test: ran tests
Change-Id: Ie9a207632d8242f42086ba3ca862519014c3c102
7a3681e5b6c39bc2b3b62031ca5941dbf7bc4e63 25-Apr-2017 Christopher Ferris <cferris@google.com> Move libc_log code into libasync_safe.

This library is used by a number of different libraries in the system.
Make it easy for platform libraries to use this library and create
an actual exported include file.

Change the names of the functions to reflect the new name of the library.

Run clang_format on the async_safe_log.cpp file since the formatting is
all over the place.

Bug: 31919199

Test: Compiled for angler/bullhead, and booted.
Test: Ran bionic unit tests.
Test: Ran the malloc debug tests.
Change-Id: I8071bf690c17b0ea3bc8dc5749cdd5b6ad58478a
bcc4da9b752f0def46d63ed7b31f3f49cc2435ad 16-Feb-2017 Dimitry Ivanov <dimitry@google.com> Unify linker files under one license (BSD)

Historically we had part of the linker licensed under BSD and
another part under Apache 2 license. This commit makes all the
linker code licensed under BSD license.

Test: m
Change-Id: I11b8163ae75966b5768d3fe992679de376106515
8cbe97de7fcd4a1e7ac5957da49cefcf188fdd47 10-Feb-2017 Dimitry Ivanov <dimitry@google.com> Remove unnecessary memsets in linker allocators

Test: linker-unit-tests
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I96f983dba77c9cb5698a9eb2e51b33bc128c6dd7
65707b696a59f28b3980c78bdb4b049231610e64 29-Jul-2016 Dimitry Ivanov <dimitry@google.com> Improvements to initialization of linker_allocator

Make linker_allocator independent of the order of global constructors.

Bug: http://b/30483811
Change-Id: I18a323175661b8e1c9e398f2d6112f7a08d2cceb
Test: boot the device with I3ac91758a1a043146c65f2ae0f36fcfbe372c30f
f857211675dcfe7abd311e4a7bef6d1685fb4a93 13-Jul-2016 Dimitry Ivanov <dimitry@google.com> Use trivial types to avoid calls to new for globals

To avoid initialization ordering problem avoid constructing
non-trivial global objects for linker_logger.

This patch also adds explicit check for bloc_size_ on alloc

Change-Id: I2cb3b13a10b7fac1f52a20038af77266d3e1da96
d9d6a84c016abea6745c7e7a789755f3449c7e4b 27-Jan-2016 Dimitry Ivanov <dimitry@google.com> Unify names for pages allocated for small objects

Bug: http://b/26776399
Change-Id: Id5b6f143a526cecca56de18ddad8857dfa1dd165
3edc5c41bbee7cf608a781e7056599f32ca1949c 21-Jan-2016 Dimitry Ivanov <dimitry@google.com> linker: align allocated blocks to 16 bytes

C/C++ requires the result of malloc/new to be
aligned for any primitive type.

Change-Id: I715b7679e738f34b3b409993fb3ef242e1321b7f
19656ce5376c95ce0deebc4d0c6af1bb8d740934 11-Mar-2015 Dmitriy Ivanov <dimitry@google.com> General purpose memory allocator for linker.

Add basic general purpose memory allocator to
linker in order to enable usage of other libraries
like libziparchive.

Change-Id: I4a680ebb36ed5ba67c61249f81dba9f567808434
c9ce70d7838b6aae074fc3615cdf04e5c9ac612a 10-Mar-2015 Dmitriy Ivanov <dimitry@google.com> Refactoring: rename linker_allocator files

Change-Id: Ifc08e64b3a85205f072b7abab1149c7ab71e2f75
05fc1d7050d5451aea08dc5f504d2670287b2d43 29-Jan-2015 Elliott Hughes <enh@google.com> Add missing includes.

Change-Id: Ibf549266a19a67eb9158d341a69dddfb654be669
4bea4c631f747cc6b570ecd42c744a9b1103bf28 09-Aug-2014 Dmitriy Ivanov <dimitry@google.com> Label pages mapped by linker_allocator

(cherry picked from commit 51a22a12ab370933a35463f5c81223132ec64dcb)

Bug: 17013324
Change-Id: I345c9d0fecc29d3626c5be01cc3c0ed1583ac361
51a22a12ab370933a35463f5c81223132ec64dcb 09-Aug-2014 Dmitriy Ivanov <dimitry@google.com> Label pages mapped by linker_allocator

Change-Id: I7e0bf29bc1a480e9be0d1ae573ca1063d90d82ff
65549969488bbce7f5d1b57714ba32c466943470 25-Jul-2014 Dmitriy Ivanov <dimitry@google.com> Fix global variable initialization for linker

Linker now calls init functions for itself.

(cherry picked from commit 4151ea73b75e274d1ff80b42d9d457a783208516)

Change-Id: I3300fe22de8ad8466a5b1c2d551429769a42852d
4151ea73b75e274d1ff80b42d9d457a783208516 25-Jul-2014 Dmitriy Ivanov <dimitry@google.com> Fix global variable initialization for linker

Linker now calls init functions for itself.

Change-Id: Ibd099812493041ac70f591e3f379ee742b4683b8
d59e50063ad708509f3ad83350be33f5612c4f54 09-May-2014 Dmitriy Ivanov <dimitry@google.com> Improve detection of already loaded libraries

Linker is now able to resolve symlinked libraries correctly.

soinfo is extended to save the graph of dependencies during
load/unload. Dependencies are used only in CallConstructor.

Bug: 9741592
Change-Id: Id9c48a74c46aa89bcdf3d54ec2f8ba3d398130b1
1079406cab09090cc11e26d4ac2f1ba9c4930cdb 14-May-2014 Dmitriy Ivanov <dimitry@google.com> Fix for linker allocator

Change-Id: I18a3f1a8515657f0deb69266184fb516a27f90e8
bc23e530c4db5175a065eeef36553c9c2c78fcf4 14-May-2014 Dmitriy Ivanov <dimitry@google.com> Remove page level mprotects

Freeing block mprotects on the page which it turn
may lead to application crash if linker subsequently
tries to modify another block on the page.

Bug: 14895266
Change-Id: I8ff7f5df467d7be184242de652032b3c84e24b76
d597d263bc32422402d4810ce4ec070f0227c2f7 06-May-2014 Dmitriy Ivanov <dimitry@google.com> Refactor linker allocator

Makes it reusable for different fixed sized and not very
big structures (<PAGE_SIZE).

Change-Id: Id5ec13fc6541b1935ef7fe3671c22b98685abbae