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

Commit

Permalink
Avoid making the EH table symbol global, its not needed any more.
Browse files Browse the repository at this point in the history
  • Loading branch information
vargaz committed Sep 23, 2016
1 parent 8b1520c commit 5b94bc7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/CodeGen/AsmPrinter/DwarfMonoException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,9 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
// Can't use rodata as the symbols we reference are in the text segment
Streamer.SwitchSection(TLOF.getTextSection());

bool is_global = true;

std::string symbol_name = MonoEHFrameSymbol;
if (symbol_name.length() == 0) {
if (symbol_name.length() == 0)
symbol_name = "mono_eh_frame";
is_global = false;
}

MCSymbol *EHFrameHdrSym =
Asm->OutContext.GetOrCreateSymbol(Twine(symbol_name));
Expand All @@ -528,10 +524,6 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
Streamer.EmitELFSize(EHFrameHdrSym, Length);
Streamer.EmitSymbolAttribute(EHFrameHdrSym, MCSA_ELF_TypeObject);
}
if (is_global) {
Streamer.EmitSymbolAttribute (EHFrameHdrSym, MCSA_Global);
Streamer.EmitSymbolAttribute (EHFrameHdrSym, MCSA_PrivateExtern);
}

// Header

Expand Down

0 comments on commit 5b94bc7

Please sign in to comment.