* readelf.c (dump_relocations): Reorder the r_info field for
little-endian mips elf64. Move #ifdef BFD64 to cover the new code.
This commit is contained in:
parent
a35bc64f56
commit
1a677ea81e
|
@ -1,3 +1,8 @@
|
||||||
|
2003-01-28 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* readelf.c (dump_relocations): Reorder the r_info field for
|
||||||
|
little-endian mips elf64. Move #ifdef BFD64 to cover the new code.
|
||||||
|
|
||||||
2003-01-21 Daniel Berlin <dan@dberlin.org>
|
2003-01-21 Daniel Berlin <dan@dberlin.org>
|
||||||
|
|
||||||
* readelf.c (display_debug_loc): Skip address base changes.
|
* readelf.c (display_debug_loc): Skip address base changes.
|
||||||
|
|
|
@ -1025,8 +1025,22 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* The #ifdef BFD64 below is to prevent a compile time warning.
|
||||||
|
We know that if we do not have a 64 bit data type that we
|
||||||
|
will never execute this code anyway. */
|
||||||
|
#ifdef BFD64
|
||||||
if (elf_header.e_machine == EM_MIPS)
|
if (elf_header.e_machine == EM_MIPS)
|
||||||
{
|
{
|
||||||
|
/* In little-endian objects, r_info isn't really a 64-bit
|
||||||
|
little-endian value: it has a 32-bit little-endian
|
||||||
|
symbol index followed by four individual byte fields.
|
||||||
|
Reorder INFO accordingly. */
|
||||||
|
if (elf_header.e_ident[EI_DATA] != ELFDATA2MSB)
|
||||||
|
info = (((info & 0xffffffff) << 32)
|
||||||
|
| ((info >> 56) & 0xff)
|
||||||
|
| ((info >> 40) & 0xff00)
|
||||||
|
| ((info >> 24) & 0xff0000)
|
||||||
|
| ((info >> 8) & 0xff000000));
|
||||||
type = ELF64_MIPS_R_TYPE (info);
|
type = ELF64_MIPS_R_TYPE (info);
|
||||||
type2 = ELF64_MIPS_R_TYPE2 (info);
|
type2 = ELF64_MIPS_R_TYPE2 (info);
|
||||||
type3 = ELF64_MIPS_R_TYPE3 (info);
|
type3 = ELF64_MIPS_R_TYPE3 (info);
|
||||||
|
@ -1035,10 +1049,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
|
||||||
type = ELF64_R_TYPE_ID (info);
|
type = ELF64_R_TYPE_ID (info);
|
||||||
else
|
else
|
||||||
type = ELF64_R_TYPE (info);
|
type = ELF64_R_TYPE (info);
|
||||||
/* The #ifdef BFD64 below is to prevent a compile time warning.
|
|
||||||
We know that if we do not have a 64 bit data type that we
|
|
||||||
will never execute this code anyway. */
|
|
||||||
#ifdef BFD64
|
|
||||||
symtab_index = ELF64_R_SYM (info);
|
symtab_index = ELF64_R_SYM (info);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue