Description[Courgette] Refactor: Store Label Annotation in AssemblyProgram for patch generation.
For Courgette-gen, label adjustment needs lists of abs32 & rel32 Label*
sorted by file offset. Let these lists be "Label Annotations".
Previously these were extracted during label adjustment from list of
instructions in AssemblyProgram, but now we wish to remove these stored
instructions.
This CL make AssemblyProgram store Label annotations. These are computed
only when needed (Courgette-gen / -gen1a). Details:
- Add ParseDetecteExecutableWithAnnotation() alongside
ParseDetecteExecutable(), to avoid affecting flows that don't require
Label Annotations.
- AssemblyProgram: Add |*_label_annotations_| as storage vectors. These
are optionally populated in InstructionStoreReceptor when
Disassembler::Disassemble() gets called.
- InstructionCountReceptor now put into use.
- Simplify Label adjustment: AssemblyProgram::HandleInstructionLabels()
is replaced with visiting AssemblyProgram's Label Annotations.
- Subtle: GraphAdjuster now includes abs64. The class doesn't get used,
but the change is logical anyway.
BUG=660980
Review-Url: https://codereview.chromium.org/2793153003
Cr-Commit-Position: refs/heads/master@{#464536}
Committed: https://chromium.googlesource.com/chromium/src/+/c4155eb674ece85b214aaf4cb781510d7377d390
Patch Set 1 #
Total comments: 2
Patch Set 2 : Sync and merge. #Patch Set 3 : Rename *_label_annotation to *_label_annotations. #
Messages
Total messages: 26 (15 generated)
|