diff options
author | paulgazz@chromium.org <paulgazz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 10:17:53 +0000 |
---|---|---|
committer | paulgazz@chromium.org <paulgazz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 10:17:53 +0000 |
commit | 39ed97339553d0d2ba201b225afd4eed460f744b (patch) | |
tree | 3817f40021a7d39d6800c98f95486d8e5d1b7a1c /courgette/types_elf.h | |
parent | 6edd61cce39b3778765af46627ef235551370077 (diff) | |
download | chromium_src-39ed97339553d0d2ba201b225afd4eed460f744b.zip chromium_src-39ed97339553d0d2ba201b225afd4eed460f744b.tar.gz chromium_src-39ed97339553d0d2ba201b225afd4eed460f744b.tar.bz2 |
Factored out common ELF processing into a common superclass, an x86 subclass, and an initial ARM subclass.
Created a new disassembler virtual class, DisassemblerElf32, that
implements the common functions for processing ELF 32-bit files. This
class is defined in disassembler_elf_32.{h|cc}, and has nearly all of
the methods and data that used to be in
disassembler_elf_32_x86.{h|cc}. This class has two subclasses, one
for x86 and one for arm, which implement the architecture-specific
parts for generating courgette patches, namely extracting relative and
absolute addresses. The ARM subclass is just a shell, but still
yields correct courgette patches.
The rest of the files add new enums for ARM and use the ARM subclasses
for the courgette command-line tool.
BUG=
Review URL: https://chromiumcodereview.appspot.com/17325003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/types_elf.h')
-rw-r--r-- | courgette/types_elf.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/courgette/types_elf.h b/courgette/types_elf.h index 9708486..f7fce71 100644 --- a/courgette/types_elf.h +++ b/courgette/types_elf.h @@ -50,6 +50,7 @@ enum e_type_values { enum e_machine_values { EM_NONE = 0, // No machine EM_386 = 3, // Intel Architecture + EM_ARM = 40, // ARM Architecture EM_x86_64 = 62, // Intel x86-64 Architecture // Other values skipped }; @@ -140,4 +141,8 @@ enum elf32_rel_386_type_values { R_386_TLS_TPOFF = 14, }; +enum elf32_rel_arm_type_values { + R_ARM_RELATIVE = 23, +}; + #endif // COURGETTE_ELF_TYPES_H_ |