[ELF] - Give automatically generated __start_* and __stop_* symbols default visibility.

This patch is opposite to D19024, which made this symbols to be hidden by default.

Unfortunately FreeBSD loader wants to see
start_set_modmetadata_set/stop_set_modmetadata_set in the dynamic symbol table. 
They were not placed there because had hidden visibility.

Patch makes them to have default visibility again.

Differential revision: https://reviews.llvm.org/D23552

llvm-svn: 279262
This commit is contained in:
George Rimar
2016-08-19 15:36:32 +00:00
parent 9989f80ae8
commit e1937bb524
6 changed files with 45 additions and 25 deletions

View File

@@ -51,8 +51,8 @@ static void addRegular(SymbolAssignment *Cmd) {
}
template <class ELFT> static void addSynthetic(SymbolAssignment *Cmd) {
Symbol *Sym = Symtab<ELFT>::X->addSynthetic(Cmd->Name, nullptr, 0);
Sym->Visibility = Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT;
Symbol *Sym = Symtab<ELFT>::X->addSynthetic(
Cmd->Name, nullptr, 0, Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT);
Cmd->Sym = Sym->body();
}