mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 21:21:50 +03:00
Utilities/readelf: Add printing for RELR relocations
This commit is contained in:
parent
3974cac148
commit
10c629055f
Notes:
sideshowbarker
2024-07-17 19:01:22 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/10c629055f Pull-request: https://github.com/SerenityOS/serenity/pull/12425 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard
@ -102,6 +102,8 @@ static const char* object_section_header_type_to_string(ElfW(Word) type)
|
||||
return "GROUP";
|
||||
case SHT_SYMTAB_SHNDX:
|
||||
return "SYMTAB_SHNDX";
|
||||
case SHT_RELR:
|
||||
return "RELR";
|
||||
case SHT_LOOS:
|
||||
return "SOOS";
|
||||
case SHT_SUNW_dof:
|
||||
@ -534,6 +536,16 @@ int main(int argc, char** argv)
|
||||
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 {
|
||||
outln("No relocations in this file.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user