[llvm-commits] [llvm] r170350 - /llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
Chandler Carruth
chandlerc at google.com
Mon Dec 17 10:33:03 PST 2012
On Mon, Dec 17, 2012 at 9:59 AM, Tim Northover <Tim.Northover at arm.com>wrote:
> Author: tnorthover
> Date: Mon Dec 17 11:59:35 2012
> New Revision: 170350
>
> URL: http://llvm.org/viewvc/llvm-project?rev=170350&view=rev
> Log:
> Query section for whether it should be executable.
>
While your next commit probably exercises this, is it possible to test it
independently? Just curious.
>
> Modified:
> llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
>
> Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=170350&r1=170349&r2=170350&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Mon Dec 17
> 11:59:35 2012
> @@ -107,20 +107,18 @@
> SymType == object::SymbolRef::ST_Unknown) {
> uint64_t FileOffset;
> StringRef SectionData;
> + bool IsCode;
> section_iterator si = obj->end_sections();
> Check(i->getFileOffset(FileOffset));
> Check(i->getSection(si));
> if (si == obj->end_sections()) continue;
> Check(si->getContents(SectionData));
> + Check(si->isText(IsCode));
> const uint8_t* SymPtr = (const
> uint8_t*)InputBuffer->getBufferStart() +
> (uintptr_t)FileOffset;
> uintptr_t SectOffset = (uintptr_t)(SymPtr -
> (const
> uint8_t*)SectionData.begin());
> - unsigned SectionID =
> - findOrEmitSection(*obj,
> - *si,
> - SymType == object::SymbolRef::ST_Function,
> - LocalSections);
> + unsigned SectionID = findOrEmitSection(*obj, *si, IsCode,
> LocalSections);
> LocalSymbols[Name.data()] = SymbolLoc(SectionID, SectOffset);
> DEBUG(dbgs() << "\tFileOffset: " << format("%p",
> (uintptr_t)FileOffset)
> << " flags: " << flags
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121217/1d2ef4aa/attachment.html>
More information about the llvm-commits
mailing list