mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Query section for whether it should be executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170350 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c2b2f9c56
commit
788221398a
@ -107,20 +107,18 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectBuffer *InputBuffer) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user