android: crazy_linker: Read library DT_SONAME entry.
This CL slightly modifies the crazy linker to extract the DT_SONAME of a given shared library. The goal is to use the soname as the unique identifier for a library during dependency resolution, as this matches the behaviour of the system linker. More precisely: - Before this CL, each library loaded by the linker is identified by a "name" that was the library path (with any directory sub-path) used to load the library. This prevents properly resolving DT_NEEDED entries, which explains one of the reasons why the crazy linker doesn't support the component build at the moment. - After this CL, system libraries are identified by their basename only (which was already the case when they were loaded through DT_NEEDED entries, but changes what happens when they are loaded through the dlopen() wrapper). Ideally, non-system libraries should be identified by the soname, but this currently doesn't work, because it breaks RELRO sharing. The reason for this is that, when loading libraries directly from a zip file, the current client code (chromium_android_linker) passes and relies on the path to the host APK directly (e.g. something like /data/data/<package-name>-<number>/base.apk and a file offset. This will be addressed in a future CL. BUG=802068 R=lizeb@chromium.org, pasko@chromium.org, agrieve@chromium.org Change-Id: Ia282c29e80e8729c4079a80de7acf66975b7d1ee Reviewed-on: https://chromium-review.googlesource.com/1042406 Commit-Queue: David Turner <digit@chromium.org> Reviewed-by:agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#557175}
Showing
Please register or sign in to comment