You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple relocations at a single instruction are not supported #346
Encountered this problem on I386, but this should affect all architectures.
Specifically, there are instructions which can have multiple relocations inside.
For example this one: c705_00000000_00000000, which is mov dword [0x0], 0x0 and is often used in my project for setting vtables in statics.
Like this:
Which objdiff displays like so:
The zero being written is actually a relocation objdiff doesn't understand.
If we update Section::relocation_at like so to take the last relocation:
I would like to implement this feature myself.
The idea would be to replace a single relocation at an instruction with a vector (or we can hardcode them to 2) and in the UI allow copying all of them when right clicked. That would mean having (at least) two more Copy rows here:
Note that there are several places in objdiff's code that made the assumption that each instruction has at most 1 relocation. Off the top of my head InstructionArg::Reloc will need an index to know which reloc it corresponds to and reloc_eq will need to be rewritten somehow to pair up all the left and right relocs properly and then compare each pair of them. Maybe some arch-specific stuff too.
Activity
LagoLunatic commentedon Apr 6, 2026
Related: #276
Note that there are several places in objdiff's code that made the assumption that each instruction has at most 1 relocation. Off the top of my head
InstructionArg::Relocwill need an index to know which reloc it corresponds to andreloc_eqwill need to be rewritten somehow to pair up all the left and right relocs properly and then compare each pair of them. Maybe some arch-specific stuff too.