aboutsummaryrefslogtreecommitdiff
path: root/reloc_elf_unittest.cc
diff options
context:
space:
mode:
authorSamuel Huang <huangs@chromium.org>2021-06-01 18:29:53 +0000
committerCopybara-Service <copybara-worker@google.com>2021-07-25 21:31:30 -0700
commit1cec5a775590551e3c9f950afad3d95a6f6d950f (patch)
tree477daf9630e47b99f77dfe41fc357d6a0a940118 /reloc_elf_unittest.cc
parent77468dc8869df3f7f7d56081c0c661f66554f9b2 (diff)
downloadzucchini-1cec5a775590551e3c9f950afad3d95a6f6d950f.tar.gz
[Zucchini] Simplify Abs32GapFinder and Rel32Finder.
Previously, using Abs32GapFinder / Rel32Finder to visit gaps / rel32 references involves calling a getter that returns an optional<> value whose emptiness indicates end of iteration. The code to use this looks like: for (auto value = finder.GetNext(); value; value = finder.GetNext()) { ... } This CL abandons optional<> usage and caches the results in Finders, thereby removing repetition in iteration code: while (finder.FindNext() { auto value = finder.GetValue(); ... } Additional changes: * Incorporate AddressTranslator into Rel32Finder to offload translation work from callers. * Add tests to integrate Abs32GapFinder with Rel32Finder. * Stylize test data to better show overlap between abs32 references with disassembled test data. Bug: 918867 Change-Id: Id044b67550f81c3f46ab383c5b6200906f56ca4e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2918113 Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Commit-Queue: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#888049} NOKEYCHECK=True GitOrigin-RevId: 89023e1c511e599e6aeaf0b8d80e3efa2e730b5b
Diffstat (limited to 'reloc_elf_unittest.cc')
0 files changed, 0 insertions, 0 deletions