mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
The same situation that effected ARM effects PPC with regards to placing the
LSDA into the TEXT section. We need to generate non-lazy pointers to it on Mach-O. However, the object the NLP points to may be local to the translation unit. If so, then the NLP needs to have the value of that object specified instead of "0", which the linker interprets as "external". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -812,7 +812,15 @@ bool PPCDarwinAsmPrinter::doFinalization(Module &M) {
|
||||
// .indirect_symbol _foo
|
||||
MachineModuleInfoImpl::StubValueTy &MCSym = Stubs[i].second;
|
||||
OutStreamer.EmitSymbolAttribute(MCSym.getPointer(), MCSA_IndirectSymbol);
|
||||
OutStreamer.EmitIntValue(0, isPPC64 ? 8 : 4/*size*/, 0/*addrspace*/);
|
||||
|
||||
if (MCSym.getInt())
|
||||
// External to current translation unit.
|
||||
OutStreamer.EmitIntValue(0, isPPC64 ? 8 : 4/*size*/, 0/*addrspace*/);
|
||||
else
|
||||
// Internal to current translation unit.
|
||||
OutStreamer.EmitValue(MCSymbolRefExpr::Create(MCSym.getPointer(),
|
||||
OutContext),
|
||||
isPPC64 ? 8 : 4/*size*/, 0/*addrspace*/);
|
||||
}
|
||||
|
||||
Stubs.clear();
|
||||
|
Reference in New Issue
Block a user