Courgette ELF section ordering needs to be less intrusive. |
||
Issue descriptionIn http://crrev.com/1870293002/, we made Courgette sort ELF section headers by file offset because this is needed for ELF parsing. This is done by copying section data and sorting them directly. However, ELF section IDs depend on the original ordering, so reordering is incorrect! One problem this causes is that prevents us from properly parsing section names (e_shstrndx), which is something we want to do soon. A better way is to keep the original section headers ordering, produce a sorted list of indexes instead, and traverse using that as needed.
,
Apr 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/691893008b56e5aea1fde29519988249b26de1c9 commit 691893008b56e5aea1fde29519988249b26de1c9 Author: huangs <huangs@chromium.org> Date: Tue Apr 19 20:04:33 2016 [Courgette] Make ELF section header sorting less intrusive. Recently we start to sort ELF section headers by file offset. However, directly sorting the section headers is intrusive because it scrambles section ids (order in array). This CL adds a layer of section id lookup, so we can visit section headers in file offset order without affecting section ids. Also updated tests. BUG= 604542 Review URL: https://codereview.chromium.org/1900223002 Cr-Commit-Position: refs/heads/master@{#388290} [modify] https://crrev.com/691893008b56e5aea1fde29519988249b26de1c9/courgette/disassembler_elf_32.cc [modify] https://crrev.com/691893008b56e5aea1fde29519988249b26de1c9/courgette/disassembler_elf_32.h [modify] https://crrev.com/691893008b56e5aea1fde29519988249b26de1c9/courgette/disassembler_elf_32_x86_unittest.cc
,
Apr 23 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by wfh@chromium.org
, Apr 19 2016Labels: -componentInternalsInstallerDiff OS-Android OS-Linux