Commit 448a6987 authored by David Turner's avatar David Turner Committed by Commit Bot

Revert "android: build: Enable RELR packed relocations for libchrome.so"

This reverts commit cf14fec1.

Reason for revert: Unexpected 3.5 MiB increase of private RAM usage

BUG=907092
TBR=agrieve@chromium.org, pasko@chromium.org

Original change's description:
> android: build: Enable RELR packed relocations for libchrome.so
> 
> NOTE: This is a reland of [1], but this one does not touch
> libchromefortest.so which is used on Android N+ during testing,
> and could not be loaded by the system linker when using RELR
> relocations.
> 
> This optimization cannot be applied to libmonochrome.so, unfortunately,
> because only Android P and above support these at the system linker
> level.
> 
> [1] https://chromium-review.googlesource.com/c/1304487
> 
> BUG=895194
> R=​agrieve@chromium.org,torne@chromium.org,pasko@chromium.org,pcc@chromium.org
> 
> Change-Id: If50f607d2e9abbff5ae0c140da342af7b8c78858
> Reviewed-on: https://chromium-review.googlesource.com/c/1317630
> Reviewed-by: agrieve <agrieve@chromium.org>
> Reviewed-by: Egor Pasko <pasko@chromium.org>
> Commit-Queue: David Turner <digit@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#609142}

TBR=pasko@chromium.org,digit@chromium.org,torne@chromium.org,pcc@chromium.org,agrieve@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 895194
Change-Id: Ib796a90aca376042d8b91f2a388060c3738bb096
Reviewed-on: https://chromium-review.googlesource.com/c/1346090Reviewed-by: default avatarDavid Turner <digit@chromium.org>
Commit-Queue: David Turner <digit@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610005}
parent 7161dfa7
......@@ -198,12 +198,6 @@ config("lld_pack_relocations") {
ldflags = [ "-Wl,--pack-dyn-relocs=android" ]
}
# Pack relocations with Android-specific relocations and RELR relocations that
# are only supported by the crazy linker and Android P+.
config("lld_pack_relocations_with_relr") {
ldflags = [ "-Wl,--pack-dyn-relocs=android+relr,--use-android-relr-tags" ]
}
# Used for instrumented build to generate the orderfile.
config("default_orderfile_instrumentation") {
if (use_order_profiling) {
......
......@@ -980,16 +980,12 @@ jinja_template_resources("chrome_test_apk_template_resources") {
# ELF relocations to reduce native library size.
# use_gnu_hash_style: If true, the final library will include only GNU hash
# tables, rather than both SysV and GNU types (the default).
# enable_relr_relocations: Optional flag. If true, and if |enable_compressed_relocations|
# is true, then reduce the size of the native library by enabling RELR relocations.
# Note that these are only supported by the Chromium linker, and Android P+.
template("chrome_common_shared_library") {
shared_library(target_name) {
forward_variables_from(invoker,
"*",
[
"enable_compressed_relocations",
"enable_relr_relocations",
"export_java_symbols",
"use_gnu_hash_style",
])
......@@ -1023,12 +1019,7 @@ template("chrome_common_shared_library") {
# Compress relocations if needed.
if (defined(invoker.enable_compressed_relocations) &&
invoker.enable_compressed_relocations) {
if (defined(invoker.enable_relr_relocations) &&
invoker.enable_relr_relocations) {
configs += [ "//build/config/android:lld_pack_relocations_with_relr" ]
} else {
configs += [ "//build/config/android:lld_pack_relocations" ]
}
configs += [ "//build/config/android:lld_pack_relocations" ]
}
if (invoker.use_gnu_hash_style && target_cpu != "mipsel" &&
......@@ -1061,7 +1052,6 @@ template("chrome_shared_library") {
}
enable_compressed_relocations = chromium_linker_supported && use_lld
enable_relr_relocations = enable_compressed_relocations
use_gnu_hash_style = chromium_linker_supported
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment