output: macho64 -- Fix OUT_REL4ADR on bigendians
commit8aa9c2eb91b700a9dfdd587457d651f29499e816
authorCyrill Gorcunov <gorcunov@gmail.com>
Wed, 4 Nov 2015 21:43:29 +0000 (5 00:43 +0300)
committerCyrill Gorcunov <gorcunov@gmail.com>
Wed, 4 Nov 2015 21:43:29 +0000 (5 00:43 +0300)
treef5852f6842b0a7d937af5c1382108a3cac3930d8
parent03f229c74f9fe8231ec0793f816e87031658cf31
output: macho64 -- Fix OUT_REL4ADR on bigendians

We're converting address value into bigendian
(on BE machine) and then continue doing arithmetics
on top, which is of course incorrect.

Instead do all operations first then convert
to BE and write it into image.

Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
output/outmac64.c