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

Issue 310483003: Add a host tool to pack R_ARM_RELATIVE relocations in libchrome.<ver>.so. (Closed)

Created:
6 years, 6 months ago by simonb (inactive)
Modified:
6 years, 6 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add a host tool to pack R_ARM_RELATIVE relocations in libchrome.<ver>.so. R_ARM_RELATIVE relocations are the bulk of dynamic relocations (the .rel.dyn section) in libchrome.<version>.so. The ELF standard representation of them is wasteful. Packing uses run length encoding to store them more efficiently. Packed relocations are placed in a new .android.rel.dyn section. Packing reduces the footprint of libchrome.<version>.so in the filesystem, in APK downloads, and in memory when loaded on the device. A packed libchrome.<version>.so is designed so that it can be loaded directly on Android, but requires the explicit support of a crazy linker that has been extended to understand packed relocations. A packed libchrome.<version>.so cannot currently be used with the standard Android runtime linker. See README.TXT and src/*.h for design and implementation notes. BUG=385553 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276043

Patch Set 1 #

Total comments: 111

Patch Set 2 : Update for review feedback. #

Patch Set 3 : Small readability and test data changes. #

Total comments: 17

Patch Set 4 : Second update for review feedback. #

Patch Set 5 : Second update for review feedback (for real this time). #

Patch Set 6 : Re-upload. #

Patch Set 7 : Remove binary test data files, dcommit separately. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2507 lines, -7 lines) Patch
A + tools/relocation_packer/LICENSE View 1 1 chunk +1 line, -1 line 0 comments Download
A tools/relocation_packer/README.TXT View 1 2 3 4 1 chunk +102 lines, -0 lines 0 comments Download
A tools/relocation_packer/relocation_packer.gyp View 1 2 3 4 1 chunk +66 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/debug.h View 1 1 chunk +88 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/debug.cc View 1 1 chunk +44 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/elf_file.h View 1 1 chunk +107 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/elf_file.cc View 1 2 3 4 1 chunk +977 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/elf_file_unittest.cc View 1 2 3 4 1 chunk +151 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/leb128.h View 1 2 3 4 1 chunk +67 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/leb128.cc View 1 1 chunk +55 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/leb128_unittest.cc View 1 1 chunk +92 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/main.cc View 1 2 3 4 1 chunk +139 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/packer.h View 1 1 chunk +51 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/packer.cc View 1 1 chunk +69 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/packer_unittest.cc View 1 1 chunk +114 lines, -0 lines 0 comments Download
A + tools/relocation_packer/src/run_all_unittests.cc View 1 chunk +5 lines, -6 lines 0 comments Download
A tools/relocation_packer/src/run_length_encoder.h View 1 1 chunk +81 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/run_length_encoder.cc View 1 1 chunk +139 lines, -0 lines 0 comments Download
A tools/relocation_packer/src/run_length_encoder_unittest.cc View 1 1 chunk +119 lines, -0 lines 0 comments Download
A tools/relocation_packer/test_data/elf_file_unittest_relocs.cc View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
simonb (inactive)
6 years, 6 months ago (2014-05-30 17:15:43 UTC) #1
rmcilroy
Overall looks pretty good. Lots of comments, but most are small (and it is a ...
6 years, 6 months ago (2014-06-02 15:16:34 UTC) #2
simonb (inactive)
https://codereview.chromium.org/310483003/diff/1/tools/relocation_packer/LICENSE File tools/relocation_packer/LICENSE (right): https://codereview.chromium.org/310483003/diff/1/tools/relocation_packer/LICENSE#newcode1 tools/relocation_packer/LICENSE:1: // Copyright (c) 2013 The Chromium Authors. All rights ...
6 years, 6 months ago (2014-06-04 16:40:35 UTC) #3
rmcilroy
Looks really good. Couple of last comments, but lgtm once these are addressed. https://codereview.chromium.org/310483003/diff/1/tools/relocation_packer/README.TXT File ...
6 years, 6 months ago (2014-06-07 11:49:07 UTC) #4
simonb (inactive)
https://codereview.chromium.org/310483003/diff/1/tools/relocation_packer/README.TXT File tools/relocation_packer/README.TXT (right): https://codereview.chromium.org/310483003/diff/1/tools/relocation_packer/README.TXT#newcode9 tools/relocation_packer/README.TXT:9: relocations are placed in a new .android.rel.dyn section. Packing ...
6 years, 6 months ago (2014-06-09 14:39:19 UTC) #5
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 6 months ago (2014-06-09 14:46:49 UTC) #6
rmcilroy
https://codereview.chromium.org/310483003/diff/40001/tools/relocation_packer/src/elf_file.cc File tools/relocation_packer/src/elf_file.cc (right): https://codereview.chromium.org/310483003/diff/40001/tools/relocation_packer/src/elf_file.cc#newcode757 tools/relocation_packer/src/elf_file.cc:757: packer.PackRelativeRelocations(relative_relocations, &packed); On 2014/06/09 14:39:19, simonb wrote: > On ...
6 years, 6 months ago (2014-06-09 14:47:23 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonb@chromium.org/310483003/60001
6 years, 6 months ago (2014-06-09 14:47:35 UTC) #8
simonb (inactive)
The CQ bit was unchecked by simonb@chromium.org
6 years, 6 months ago (2014-06-09 15:04:06 UTC) #9
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 6 months ago (2014-06-09 15:10:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonb@chromium.org/310483003/80001
6 years, 6 months ago (2014-06-09 15:10:32 UTC) #11
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 6 months ago (2014-06-09 16:42:25 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonb@chromium.org/310483003/120001
6 years, 6 months ago (2014-06-09 16:43:08 UTC) #13
Andrew Hayden (chromium.org)
For posterity the separate dcommit of the binaries for testing is here: https://codereview.chromium.org/310483003/ https://src.chromium.org/viewvc/chrome?revision=275818&view=revision
6 years, 6 months ago (2014-06-09 16:44:44 UTC) #14
Andrew Hayden (chromium.org)
Er, the code review for the dcommit: https://codereview.chromium.org/325783002/
6 years, 6 months ago (2014-06-09 16:45:33 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-06-10 08:48:33 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 11:50:55 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/150196)
6 years, 6 months ago (2014-06-10 11:50:56 UTC) #18
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 6 months ago (2014-06-10 12:30:02 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonb@chromium.org/310483003/120001
6 years, 6 months ago (2014-06-10 12:36:35 UTC) #20
commit-bot: I haz the power
6 years, 6 months ago (2014-06-10 15:57:54 UTC) #21
Message was sent while issue was closed.
Change committed as 276043

Powered by Google App Engine
This is Rietveld 408576698