mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +00:00
readelf: Add names for x86_64 relocations and machine type
This commit is contained in:
parent
294b918e9b
commit
3ed29895e4
1 changed files with 17 additions and 0 deletions
|
@ -58,6 +58,8 @@ static const char* object_machine_type_to_string(ElfW(Half) type)
|
||||||
return "Intel 80860";
|
return "Intel 80860";
|
||||||
case EM_MIPS:
|
case EM_MIPS:
|
||||||
return "MIPS R3000 Big-Endian only";
|
return "MIPS R3000 Big-Endian only";
|
||||||
|
case EM_X86_64:
|
||||||
|
return "Advanced Micro Devices X86-64";
|
||||||
default:
|
default:
|
||||||
return "(?)";
|
return "(?)";
|
||||||
}
|
}
|
||||||
|
@ -224,6 +226,7 @@ static const char* object_symbol_binding_to_string(ElfW(Word) type)
|
||||||
static const char* object_relocation_type_to_string(ElfW(Word) type)
|
static const char* object_relocation_type_to_string(ElfW(Word) type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
#if ARCH(I386)
|
||||||
case R_386_NONE:
|
case R_386_NONE:
|
||||||
return "R_386_NONE";
|
return "R_386_NONE";
|
||||||
case R_386_32:
|
case R_386_32:
|
||||||
|
@ -246,6 +249,20 @@ static const char* object_relocation_type_to_string(ElfW(Word) type)
|
||||||
return "R_386_TLS_TPOFF";
|
return "R_386_TLS_TPOFF";
|
||||||
case R_386_TLS_TPOFF32:
|
case R_386_TLS_TPOFF32:
|
||||||
return "R_386_TLS_TPOFF32";
|
return "R_386_TLS_TPOFF32";
|
||||||
|
#else
|
||||||
|
case R_X86_64_NONE:
|
||||||
|
return "R_X86_64_NONE";
|
||||||
|
case R_X86_64_64:
|
||||||
|
return "R_X86_64";
|
||||||
|
case R_X86_64_GLOB_DAT:
|
||||||
|
return "R_x86_64_GLOB_DAT";
|
||||||
|
case R_X86_64_JUMP_SLOT:
|
||||||
|
return "R_X86_64_JUMP_SLOT";
|
||||||
|
case R_X86_64_RELATIVE:
|
||||||
|
return "R_X86_64_RELATIVE";
|
||||||
|
case R_X86_64_TPOFF64:
|
||||||
|
return "R_X86_64_TPOFF64";
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return "(?)";
|
return "(?)";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue