New issue
Advanced search Search tips

Issue 881902 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Zucchini: Support RELA in ELF, possibly use addend information redundancy to decrease patch size.

Project Member Reported by hua...@chromium.org, Sep 7

Issue description

4 main ELF reloc units are:

struct Elf32_Rel {
  Elf32_Addr r_offset;
  Elf32_Word r_info;
};

struct Elf64_Rel {
  Elf64_Addr r_offset;
  Elf64_Xword r_info;
};

struct Elf32_Rela {
  Elf32_Addr r_offset;
  Elf32_Word r_info;
  Elf32_Sword r_addend;
};

struct Elf64_Rela {
  Elf64_Addr r_offset;
  Elf64_Xword r_info;
  Elf64_Sxword r_addend;
};

Currently Zucchini only partially supports RELA, by treating it as REL (since the {r_offset, r_info} fields are in the same location). Moreover, for RELA we also use the bytes stored at |r_offset|, instead of |r_addend|.

We propose to do the following:

(1) Sweep through benchmark to see how bytes stored at |r_offset| agree with |r_addened|.

(2) If there is agreement, then redundant information is available, leading to opportunity to decrease patch size for ELF! Still need to plan how to to use this though.  If there are large differences, then current approach is likely wrong, and need to be fixed.


 

Sign in to add a comment