I need to calculate certain offsets of symbols inside a given binary.
Finding the symbols is done using a RE tool such as Ghidra.
However, the tool sets the addresses according to the Image Base
parameter in the header of the binary (Elf/PE/etc.)
How do rellocate the binary to address 0 in Ghidra?
Set the following parameter to 0
:
Window -> Memory map -> Set Image Base (house icon)