History log of /ndk/sources/android/crazy_linker/src/linker_phdr.h
Revision Date Author Comments
cc87d1d56b0e1cef0131d9193c702d528417b61a 17-Sep-2013 David 'Digit' Turner <digit@android.com> crazy_linker: refactor shared RELRO API.

This patch changes the way shared RELRO section are implemented to
make them less confusing with regards of ashmem region ownership,
and support "relocated RELROs". Now:

- The client explicitely creates the shared RELRO region with
crazy_library_create_shared_relro(), this allocates an Ashmem
region, but does not map it in the address space.

The client becomes the owner of the Ashmem file descriptor and
is now responsible for closing it.

- The client maps a shared RELRO region with
crazy_library_use_shared_relro(), as before, this doesn't transfer
ownership of the Ashmem region file descriptor to the library.

Note that this function does _not_ close the file descriptor,
unlike the previous crazy_library_use_relro_sharing().

- crazy_library_create_shared_relro() also supports "relocated RELRO",
i.e. when one wants to create a RELRO section that will be populated
with data corresponding to a _different_ load address than what the
library is currently using in the current process.

A new unit test (test_relocated_shared_relro) has been added to
test this feature.

+ Some internal refactoring, to prepare for future work (e.g. the ability
to lookup symbols directly into system libraries).

Change-Id: I597b99889115d1d504ec2d172a9d259edbeee823
48cdce8c044f6e7d11aa2b5eb97635c922e0bc58 28-Jul-2013 David 'Digit' Turner <digit@android.com> Add crazy_linker sources.

This patch adds a new NDK support static library, named crazy_linker,
that implements a custom dynamic linker, to work-around limitations
of the system one.

See sources/android/crazy_linker/README.TXT for all details.

+ Add a new device test (crazy_linker) to run all unit and functional
tests for the linker.

+ Fix a bug in minitest's formatting function and reformat the code
a bit.

This code has been written for Chrome, but could also benefit other
applications that use multiple-processes and large shared libraries
at the same time. For more details, see:

https://code.google.com/p/chromium/issues/detail?id=287739

Change-Id: Ibefbbabedeb68d023b3b4c3b8392bd76b7baa1c2