1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-27 10:23:41 +03:00

Remove a static local variable

This commit is contained in:
Rui Ueyama 2021-04-06 00:25:45 +09:00
parent 59ee95a797
commit a02fc7edb6
2 changed files with 3 additions and 2 deletions

2
mold.h
View File

@ -1251,6 +1251,8 @@ struct Context {
// Symbol table
ConcurrentMap<Symbol<E>> symbol_map;
ConcurrentMap<ComdatGroup> comdat_groups;
// Symbol auxiliary data
std::vector<SymbolAux> symbol_aux;

View File

@ -150,8 +150,7 @@ void ObjectFile<E>::initialize_sections(Context<E> &ctx) {
if (entries[0] != GRP_COMDAT)
Fatal(ctx) << *this << ": unsupported SHT_GROUP format";
static ConcurrentMap<ComdatGroup> map;
ComdatGroup *group = map.insert(signature, ComdatGroup());
ComdatGroup *group = ctx.comdat_groups.insert(signature, ComdatGroup());
comdat_groups.push_back({group, entries.subspan(1)});
static Counter counter("comdats");