mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Utilities/readelf: Add printing for RELR relocations
This commit is contained in:
parent
3974cac148
commit
10c629055f
1 changed files with 12 additions and 0 deletions
|
@ -102,6 +102,8 @@ static const char* object_section_header_type_to_string(ElfW(Word) type)
|
||||||
return "GROUP";
|
return "GROUP";
|
||||||
case SHT_SYMTAB_SHNDX:
|
case SHT_SYMTAB_SHNDX:
|
||||||
return "SYMTAB_SHNDX";
|
return "SYMTAB_SHNDX";
|
||||||
|
case SHT_RELR:
|
||||||
|
return "RELR";
|
||||||
case SHT_LOOS:
|
case SHT_LOOS:
|
||||||
return "SOOS";
|
return "SOOS";
|
||||||
case SHT_SUNW_dof:
|
case SHT_SUNW_dof:
|
||||||
|
@ -534,6 +536,16 @@ int main(int argc, char** argv)
|
||||||
outln();
|
outln();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outln();
|
||||||
|
|
||||||
|
size_t relr_count = 0;
|
||||||
|
object->for_each_relr_relocation([&relr_count](auto) { ++relr_count; });
|
||||||
|
if (relr_count != 0) {
|
||||||
|
outln("Relocation section '.relr.dyn' at offset {:#08x} contains {} entries:", object->relr_relocation_section().offset(), object->relr_relocation_section().entry_count());
|
||||||
|
outln("{:>8x} offsets", relr_count);
|
||||||
|
object->for_each_relr_relocation([](auto offset) { outln("{:p}", offset); });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
outln("No relocations in this file.");
|
outln("No relocations in this file.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue