horsicq / XELFViewer

ELF file viewer/editor for Windows, Linux and MacOS.
http://ntinfo.biz
MIT License
1.36k stars 114 forks source link

Relocation types get misinterpreted #45

Open ascpixi opened 3 weeks ago

ascpixi commented 3 weeks ago

With the latest binary release of XELFViewer (v0.05), some relocations get their type mistaken. For example, R_X86_64_64 is displayed as X86_64_32, and R_X86_64_PC32 is displayed as 386_PC32. This can be verified by invoking readelf --relocs <...> on the file in question, or by doing the bitwise arithmethic manually:

type = 0000002e00000001, displayed as X86_64_32 in XELFViewer
0x0000002e00000001 & 0xffffffff = 1
1 = R_AMD64_64 (R_X86_64_64)

screenshot

horsicq commented 3 weeks ago

Thanks for the bugreport! I will take a look.