Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Commit 5b94bc7

Browse files
committed
Avoid making the EH table symbol global, its not needed any more.
1 parent 8b1520c commit 5b94bc7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/CodeGen/AsmPrinter/DwarfMonoException.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,9 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
508508
// Can't use rodata as the symbols we reference are in the text segment
509509
Streamer.SwitchSection(TLOF.getTextSection());
510510

511-
bool is_global = true;
512-
513511
std::string symbol_name = MonoEHFrameSymbol;
514-
if (symbol_name.length() == 0) {
512+
if (symbol_name.length() == 0)
515513
symbol_name = "mono_eh_frame";
516-
is_global = false;
517-
}
518514

519515
MCSymbol *EHFrameHdrSym =
520516
Asm->OutContext.GetOrCreateSymbol(Twine(symbol_name));
@@ -528,10 +524,6 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
528524
Streamer.EmitELFSize(EHFrameHdrSym, Length);
529525
Streamer.EmitSymbolAttribute(EHFrameHdrSym, MCSA_ELF_TypeObject);
530526
}
531-
if (is_global) {
532-
Streamer.EmitSymbolAttribute (EHFrameHdrSym, MCSA_Global);
533-
Streamer.EmitSymbolAttribute (EHFrameHdrSym, MCSA_PrivateExtern);
534-
}
535527

536528
// Header
537529

0 commit comments

Comments
 (0)