From 25818a6e26710e555dd8a32e8a6475ec20b60d65 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 18 Feb 2014 21:46:39 +0000 Subject: Consistently check 'IsCode' when allocating sections in RuntimeDyld (via findOrEmitSection). Vaidas Gasiunas's patch, r201259, fixed one instance where we were always allocating sections as text. This patch fixes the remaining buggy call sites. No test case: This isn't breaking anything that I know of, it's just inconsistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201605 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index 0408337fff..be80cbcfda 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -378,7 +378,9 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID, } } else { SectionRef Sec = MachO->getRelocationSection(RE); - Value.SectionID = findOrEmitSection(Obj, Sec, true, ObjSectionToID); + bool IsCode = false; + Sec.isText(IsCode); + Value.SectionID = findOrEmitSection(Obj, Sec, IsCode, ObjSectionToID); uint64_t Addr; Sec.getAddress(Addr); Value.Addend = Addend - Addr; -- cgit v1.2.3