diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-01-11 17:21:46 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-01-11 17:21:46 +0300 |
commit | d4923fc6a2604ecb8b3e89fa07522c009816e58d (patch) | |
tree | 93d172852f6e8a3f593a22e1aadb10d594dd242d | |
parent | 78f477b35f5b646771f8be24002034b792d0a28b (diff) | |
download | nasm-d4923fc6a2604ecb8b3e89fa07522c009816e58d.tar.gz |
output: maco 64 -- Fix data conversion
Looks like were a typo in first place
http://bugzilla.nasm.us/show_bug.cgi?id=3392298
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | output/outmac64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/output/outmac64.c b/output/outmac64.c index fbbea063..c07dcbc9 100644 --- a/output/outmac64.c +++ b/output/outmac64.c @@ -598,7 +598,7 @@ static void macho_output(int32_t secto, const void *data, " section base references"); } else { if (wrt == NO_SEG) { - *mydata -= add_reloc(s, section, 1, 4, (int64_t)*mydata); // X86_64_RELOC_SIGNED/BRANCH + *mydata -= add_reloc(s, section, 1, 4, *(int64_t *)mydata); // X86_64_RELOC_SIGNED/BRANCH } else if (wrt == macho_gotpcrel_sect) { if (s->data->datalen > 1) { saa_fread(s->data, s->data->datalen-2, &gotload, 1); // Retrieve Instruction Opcode @@ -606,9 +606,9 @@ static void macho_output(int32_t secto, const void *data, gotload = 0; } if (gotload == 0x8B) { // Check for MOVQ Opcode - *mydata -= add_reloc(s, section, 4, 4, (int64_t)*mydata); // X86_64_GOT_LOAD (MOVQ load) + *mydata -= add_reloc(s, section, 4, 4, *(int64_t *)mydata); // X86_64_GOT_LOAD (MOVQ load) } else { - *mydata -= add_reloc(s, section, 3, 4, (int64_t)*mydata); // X86_64_GOT + *mydata -= add_reloc(s, section, 3, 4, *(int64_t *)mydata); // X86_64_GOT } } else { nasm_error(ERR_NONFATAL, "Mach-O format does not support" |