Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2951)

Unified Diff: base/android/linker/crazy_linker/README.TXT

Issue 23717023: Android: Add chrome-specific dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename library Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/linker/crazy_linker/README.TXT
diff --git a/base/android/linker/crazy_linker/README.TXT b/base/android/linker/crazy_linker/README.TXT
new file mode 100644
index 0000000000000000000000000000000000000000..ecfde29e87dd8ff2596a3a6fcc861a0d9437dee9
--- /dev/null
+++ b/base/android/linker/crazy_linker/README.TXT
@@ -0,0 +1,43 @@
+A custom dynamic linker for Android programs that adds a few interesting
+features compared to /system/bin/linker:
+
+ - Supports loading a library at an explicit (page-aligned) memory
+ address. The system linker always randomizes the address.
+
+ - Supports loading a library from an explicit (page-aligned) file
+ offset. This can be useful to load a library directly from an .apk,
+ provided that it is uncompressed and at a page-aligned offset.
+
+ - Support changing the library search path. The system linker, when used
+ inside Android applications, is limited to the boot LD_LIBRARY_PATH
+ value, that only looks into system directories, not application ones.
+
+ - Support sharing of RELRO sections. When two processes load the same
+ library at exactly the same address, the content of its RELRO section
+ is identical. By default, each instance uses private RAM pages to host
+ it, but it is possible to use a single ashmem region to share the same
+ data instead.
+
+See include/crazy_linker.h for the API and its documentation.
+
+A few notes:
+
+ - The crazy linker will always use the system linker to load system
+ libraries (e.g. liblog.so and others). This avoids having two instances
+ of the same library in the same process, and correctly resolving any
+ symbols from system libraries.
+
+ - Any library loaded by the crazy linker, and which uses functions of
+ libdl.so will continue to work. However, calls to dlopen(), dlsym(),
+ et al will be redirected to the crazy linker's own wrappers.
+
+ This ensures that if a library is loaded by the crazy linker, any of
+ its dependencies will be loaded by it too.
+
+BUGS & TODO:
+ - At the moment, libraries loaded by the crazy linker are not visible
+ by GDB or third-party tools like Breakpad. Similarly, cross-library
+ stack unwinding has not been tested yet.
+
+ - Libraries loaded by the crazy linker are not automatically closed when
+ the process exits.

Powered by Google App Engine
This is Rietveld 408576698