summaryrefslogtreecommitdiffstats
path: root/courgette/patcher_x86_32.h
diff options
context:
space:
mode:
authorhuangs <huangs@chromium.org>2016-01-21 22:03:25 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 06:04:22 +0000
commitc9048834672beecaab298f89995a54e4b1fe40f7 (patch)
tree1cc1b4018fccac8db176ddfebf231b78c9b4b3a1 /courgette/patcher_x86_32.h
parentf64f908c5c41aa8d68feec7220ad9aa9d7f66f01 (diff)
downloadchromium_src-c9048834672beecaab298f89995a54e4b1fe40f7.zip
chromium_src-c9048834672beecaab298f89995a54e4b1fe40f7.tar.gz
chromium_src-c9048834672beecaab298f89995a54e4b1fe40f7.tar.bz2
[Courgette] Fold TrimLabels() into ParseDetectedExecutable().
TrimLabels() was a post-processing step after ParseDetectedExecutable(). Soon we'll do trimming earlier in the flow. However, existing code calls TrimLabels() right after ParseDetectedExecutable(). This CL moves TrimLabels() into ParseDetectedExecutable() to simplify the transition. Existing flows that call ParseDetectedExecutable() are also inconsistent in TrimLabel() usage; {-gen, -apply, -dis} do, and debugging flows {-disadj, -gen1a, -gen1u} don't. This CL makes the debugging flows use TrimLabel(). This side effect is likely positive, since it improves consistently. Meanwhile, the actual impact is small: TrimLabels() is active only for ELF ARM anyway. Review URL: https://codereview.chromium.org/1615513002 Cr-Commit-Position: refs/heads/master@{#370916}
Diffstat (limited to 'courgette/patcher_x86_32.h')
-rw-r--r--courgette/patcher_x86_32.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/courgette/patcher_x86_32.h b/courgette/patcher_x86_32.h
index 3461d79..28db059 100644
--- a/courgette/patcher_x86_32.h
+++ b/courgette/patcher_x86_32.h
@@ -55,13 +55,6 @@ class PatcherX86_32 : public TransformationPatcher {
if (status != C_OK)
return status;
- // Trim labels below a certain threshold
- Status trim_status = TrimLabels(program);
- if (trim_status != C_OK) {
- DeleteAssemblyProgram(program);
- return trim_status;
- }
-
EncodedProgram* encoded = NULL;
status = Encode(program, &encoded);
DeleteAssemblyProgram(program);