From ce224eb58d0104850f16009b00e950482788e6db Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Mon, 16 Oct 2017 01:47:21 +0200 Subject: [PATCH] Fix single-segment apps (fixes #33) --- Elf2Mac/Object.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Elf2Mac/Object.cc b/Elf2Mac/Object.cc index ca96127b4d..d3fd458a72 100644 --- a/Elf2Mac/Object.cc +++ b/Elf2Mac/Object.cc @@ -132,8 +132,12 @@ Object::Object(string input) void Object::FlatCode(std::ostream& out) { for(auto sec : codeSections) + { + sec->FixRelocs(); out << sec->GetData(); - + } + + dataSection->FixRelocs(); out << dataSection->GetData(); std::vector relocs;