Skip to content
Commit b8f2c96d authored by Egor Pasko's avatar Egor Pasko Committed by Chromium LUCI CQ
Browse files

Reland: base/android: add params to loadLibraryImplLocked

=== Original commit description:

> Replace the (confusing?) notion of |isFixedAddressPermitted| with a
> RelroSharingMode that is one of NO_SHARING/PRODUCE/CONSUME chosen by
> Linker.java. Thus, a little bit of logic in determining the RELRO
> sharing mode is deduplicated from {Legacy,Modern}Linker.
>
> Also make Linker.mRelroProducer and Linker.mBaseLoadAddress private -
> the mode and loadAddress are passed to the Linker subclasses
> explicitly.

> The Linker subclasses still non-trivially reuse Linker.mLibInfo, which
> makes separating them out nontrivial, not doing it here.

=== Update:

The LegacyLinker did not properly handle NO_SHARING, resulting in
CONSUME behavior. Apparently a number of bots running N,O,P use the
LegacyLinker (chrome_public_test_apk, chrome_public_test_vr_apk etc) and
_very_ often fail at the first attempt to load the library. Though they
always pass on retry. Crazylinker does not output/return enough
diagnostics to investigate.

The reaction to NO_SHARING was changed to behave as PRODUCE, which
matches the current behavior. The main feature of this approach - do not
hang forever waiting for the RELRO FD. Generally the LegacyLinker cannot
fall back to the system linker (on N,O,P it could, but let's not create
one more mode of running this), so it goes through PRODUCE, and then
silently fails to use its own RELRO FD - this is WAI.

Bug: 1154224
Change-Id: Iadd28fb83d71ad0753f142b94a08490ec26458ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2736639


Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#860160}
parent c655cfab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment