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

Issue 404553003: Create builds configured for ARM and AARCH64. (Closed)

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

Description

Create builds configured for ARM and AARCH64. Second phase of extending the relocation packer for arm64. Add elf_traits.h to define either Elf32 or Elf64 structs and functions as ELF traits, depending on macro definitions. Use ELF:: types in place of Elf32_ (mechanical). Widen leb128 to handle 64-bit unsigned values, and revise implementation for better readability and efficiency (and to match sleb128, coming later). Change packer and run length encoder functions and function signatures to handle the Elf types that represent the items they pack and encode (mechanical). Move elf_ assignment to the end of ElfFile::Load(), so that it is assigned only if loading succeeds. Factor out FindDynamicEntry() to improve readability. Use ELF_R_INFO() to set r_info in relocations. Print elf_errmsg() error string on failure to load. Do full round-trip pack and unpack check with a single memcmp(). Still to do: - Add support for relative relocations with addends (RELA). - Add new packing strategy for RELA (requires sleb128). - Modify relocation_packer.gyp to build both configurations. - Extend unit tests to accommodate. BUG=385553 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284493

Patch Set 1 #

Patch Set 2 : Remove distracting unsigned's in unit tests. #

Patch Set 3 : More unsigneds, comment drift. #

Patch Set 4 : Purge unused includes. #

Total comments: 19

Patch Set 5 : Feedback updates. #

Patch Set 6 : Rename DT tags to DT_ANDROID_REL_XXX #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -398 lines) Patch
M tools/relocation_packer/relocation_packer.gyp View 1 2 3 4 3 chunks +20 lines, -0 lines 0 comments Download
M tools/relocation_packer/src/debug.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M tools/relocation_packer/src/debug_unittest.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M tools/relocation_packer/src/elf_file.h View 4 chunks +9 lines, -9 lines 0 comments Download
M tools/relocation_packer/src/elf_file.cc View 1 2 3 4 5 36 chunks +212 lines, -200 lines 0 comments Download
A tools/relocation_packer/src/elf_traits.h View 1 2 3 4 1 chunk +101 lines, -0 lines 0 comments Download
M tools/relocation_packer/src/leb128.h View 1 2 3 4 chunks +8 lines, -7 lines 0 comments Download
M tools/relocation_packer/src/leb128.cc View 3 chunks +20 lines, -19 lines 0 comments Download
M tools/relocation_packer/src/leb128_unittest.cc View 3 chunks +41 lines, -22 lines 0 comments Download
M tools/relocation_packer/src/main.cc View 1 2 3 3 chunks +8 lines, -9 lines 0 comments Download
M tools/relocation_packer/src/packer.h View 1 2 3 2 chunks +10 lines, -10 lines 0 comments Download
M tools/relocation_packer/src/packer.cc View 1 2 3 2 chunks +8 lines, -11 lines 0 comments Download
M tools/relocation_packer/src/packer_unittest.cc View 1 2 3 4 4 chunks +37 lines, -32 lines 0 comments Download
M tools/relocation_packer/src/run_length_encoder.h View 1 2 3 3 chunks +17 lines, -18 lines 0 comments Download
M tools/relocation_packer/src/run_length_encoder.cc View 1 2 3 4 6 chunks +31 lines, -30 lines 0 comments Download
M tools/relocation_packer/src/run_length_encoder_unittest.cc View 1 2 3 4 4 chunks +34 lines, -29 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
simonb (inactive)
6 years, 5 months ago (2014-07-17 16:43:34 UTC) #1
rmcilroy
Generally looks good. If you could remove "Arm" references from all places other than elf-traits ...
6 years, 5 months ago (2014-07-18 14:05:17 UTC) #2
simonb (inactive)
Thanks. Updates in patch set 5. https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/relocation_packer.gyp File tools/relocation_packer/relocation_packer.gyp (right): https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/relocation_packer.gyp#newcode12 tools/relocation_packer/relocation_packer.gyp:12: '-DTARGET_ARM', On 2014/07/18 ...
6 years, 5 months ago (2014-07-21 12:15:50 UTC) #3
rmcilroy
lgtm Thanks! https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/src/elf_file.cc File tools/relocation_packer/src/elf_file.cc (right): https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/src/elf_file.cc#newcode26 tools/relocation_packer/src/elf_file.cc:26: static const ELF::Sword DT_ANDROID_ARM_REL_SIZE = DT_LOPROC + ...
6 years, 5 months ago (2014-07-21 15:22:00 UTC) #4
rmcilroy
https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/src/elf_file.cc File tools/relocation_packer/src/elf_file.cc (right): https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/src/elf_file.cc#newcode355 tools/relocation_packer/src/elf_file.cc:355: // adjustments to tags that indicate the counts of ...
6 years, 5 months ago (2014-07-21 15:24:52 UTC) #5
simonb (inactive)
Updates in patch set 6. https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/src/elf_file.cc File tools/relocation_packer/src/elf_file.cc (right): https://codereview.chromium.org/404553003/diff/60001/tools/relocation_packer/src/elf_file.cc#newcode26 tools/relocation_packer/src/elf_file.cc:26: static const ELF::Sword DT_ANDROID_ARM_REL_SIZE ...
6 years, 5 months ago (2014-07-21 16:02:19 UTC) #6
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 5 months ago (2014-07-21 16:02:52 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/404553003/100001
6 years, 5 months ago (2014-07-21 16:04:22 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 5 months ago (2014-07-21 19:19:57 UTC) #9
commit-bot: I haz the power
6 years, 5 months ago (2014-07-21 20:05:38 UTC) #10
Message was sent while issue was closed.
Change committed as 284493

Powered by Google App Engine
This is Rietveld 408576698