mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94290 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -245,8 +245,9 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
|
||||
// This name has no connection to the function, so it might get
|
||||
// dead-stripped when the function is not, erroneously. Prohibit
|
||||
// dead-stripping unconditionally.
|
||||
if (const char *UsedDirective = MAI->getUsedDirective())
|
||||
O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n";
|
||||
if (MAI->hasNoDeadStrip())
|
||||
Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
|
||||
MCStreamer::NoDeadStrip);
|
||||
} else {
|
||||
O << *EHFrameInfo.FunctionEHSym << ":\n";
|
||||
|
||||
@@ -313,8 +314,9 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
|
||||
// on unused functions (calling undefined externals) being dead-stripped to
|
||||
// link correctly. Yes, there really is.
|
||||
if (MMI->isUsedFunction(EHFrameInfo.function))
|
||||
if (const char *UsedDirective = MAI->getUsedDirective())
|
||||
O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n";
|
||||
if (MAI->hasNoDeadStrip())
|
||||
Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
|
||||
MCStreamer::NoDeadStrip);
|
||||
}
|
||||
Asm->O << '\n';
|
||||
}
|
||||
@@ -982,7 +984,7 @@ void DwarfException::EndFunction() {
|
||||
EmitLabel("eh_func_end", SubprogramCount);
|
||||
EmitExceptionTable();
|
||||
|
||||
const MCSymbol *FunctionEHSym =
|
||||
MCSymbol *FunctionEHSym =
|
||||
Asm->GetSymbolWithGlobalValueBase(MF->getFunction(), ".eh",
|
||||
Asm->MAI->is_EHSymbolPrivate());
|
||||
|
||||
|
Reference in New Issue
Block a user