From: nasm-bot f. C. G. <gor...@gm...> - 2015-01-11 14:24:35
|
Commit-ID: d4923fc6a2604ecb8b3e89fa07522c009816e58d Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=d4923fc6a2604ecb8b3e89fa07522c009816e58d Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 11 Jan 2015 17:21:46 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 11 Jan 2015 17:21:46 +0300 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 <gor...@gm...> --- output/outmac64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/output/outmac64.c b/output/outmac64.c index fbbea06..c07dcbc 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" |