diff options
author | Petr Machata <pmachata@redhat.com> | 2009-07-19 17:45:23 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2009-07-19 17:45:23 +0200 |
commit | c3bc1498e7806370dff49854e318ede8dacbbe03 (patch) | |
tree | 2a260213b55753b3f1fbb1bf2176370fc2311422 | |
parent | fa44b50696e5713bdc64fdc125e88943b73ecedb (diff) | |
download | elfutils-c3bc1498e7806370dff49854e318ede8dacbbe03.tar.gz |
dwarflint: Forgot to commit the other_byte_order bit
-rw-r--r-- | src/dwarflint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dwarflint.c b/src/dwarflint.c index 29238551..9ad978f1 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -1030,6 +1030,13 @@ elf_file_init (struct elf_file *file, Elf *elf) file->addr_64 = file->ehdr.e_ident[EI_CLASS] == ELFCLASS64; + /* Taken from dwarf_begin_elf.c. */ + if ((BYTE_ORDER == LITTLE_ENDIAN + && file->ehdr.e_ident[EI_DATA] == ELFDATA2MSB) + || (BYTE_ORDER == BIG_ENDIAN + && file->ehdr.e_ident[EI_DATA] == ELFDATA2LSB)) + file->other_byte_order = true; + struct secinfo { const char *name; |