New issue
Advanced search Search tips

Issue 604542 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 1
Type: Bug



Sign in to add a comment

Courgette ELF section ordering needs to be less intrusive.

Project Member Reported by hua...@chromium.org, Apr 18 2016

Issue description

In 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.
 

Comment 1 by wfh@chromium.org, Apr 19 2016

Components: Internals>Installer>Diff
Labels: -componentInternalsInstallerDiff OS-Android OS-Linux
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Comment 3 by hua...@chromium.org, Apr 23 2016

Status: Fixed (was: Assigned)

Sign in to add a comment