Hex immediates in the mov instruction can be stripped of the hex prefix 0x causing an error with finding the address immediate in process_reloc.
mov is included in instructions_with_address_immediates for I686.
Code that removes the hex prefix:
addr = ""
if mnemonic in arch.instructions_with_address_immediates:
row, addr = split_off_address(row)
# objdump prefixes addresses with 0x/-0x if they don't resolve to some
# symbol + offset. Strip that.
addr = addr.replace("0x", "")
decomp.me scratch:
https://decomp.me/scratch/dA1P1
Relevant line of code:
g_EnemyManagerDrawChain.arg = mgr;
objdump output:
9a: mov %edx,0x1c
9c: dir32 ?g_EnemyManagerDrawChain@@3VChainElem@@A-0xee5ec
0x1c is an offset which the relocation should be applied to: mov %edx,?g_EnemyManagerDrawChain@@3VChainElem@@A-0xee5ec+0x1c
Hex immediates in the mov instruction can be stripped of the hex prefix
0xcausing an error with finding the address immediate inprocess_reloc.movis included ininstructions_with_address_immediatesforI686.Code that removes the hex prefix:
decomp.me scratch:
https://decomp.me/scratch/dA1P1
Relevant line of code:
g_EnemyManagerDrawChain.arg = mgr;objdump output:
0x1cis an offset which the relocation should be applied to:mov %edx,?g_EnemyManagerDrawChain@@3VChainElem@@A-0xee5ec+0x1c