macho/reloc: Fixed offset adjustment in add_reloc()
macho/reloc: Fixed offset adjustment in add_reloc()

If the target symbol is in the same file, add_reloc() emits an
internal reloc for the target section, and the offset written
is the offset in the target section.  If the target symbol is
external, its offset is zero (or an explicit addend), and
add_reloc() emits an external reloc for the symbol.

Based-on-code-from: zenith432 <34af7ae747ebe653036517897481b0763d276599@users.sourceforge.net>
Signed-off-by: Chang S. Bae <5225702d5f350302bceb6664e109365ef85e2e11@gmail.com>

techkey/nasm,techkey/nasm,techkey/nasm,techkey/nasm,techkey/nasm