mirror of
https://github.com/rui314/mold.git
synced 2024-12-26 01:44:29 +03:00
temporary
This commit is contained in:
parent
ac9d4cd6e4
commit
23e874eb50
2
mold.h
2
mold.h
@ -620,7 +620,7 @@ private:
|
||||
void write_symtab(u8 *buf, u64 symtab_off, u64 strtab_off, u32 start, u32 end);
|
||||
|
||||
MemoryBufferRef mb;
|
||||
std::vector<std::pair<ComdatGroup *, u32>> comdat_groups;
|
||||
std::vector<std::pair<ComdatGroup *, ArrayRef<ELF64LE::Word>>> comdat_groups;
|
||||
|
||||
std::vector<Symbol> local_symbols;
|
||||
std::vector<StringPieceRef> sym_pieces;
|
||||
|
@ -51,7 +51,7 @@ void ObjectFile::initialize_sections() {
|
||||
|
||||
static ConcurrentMap<ComdatGroup> map;
|
||||
ComdatGroup *group = map.insert(signature, ComdatGroup(nullptr, 0));
|
||||
comdat_groups.push_back({group, i});
|
||||
comdat_groups.push_back({group, entries});
|
||||
|
||||
static Counter counter("comdats");
|
||||
counter.inc();
|
||||
@ -413,14 +413,10 @@ void ObjectFile::resolve_comdat_groups() {
|
||||
void ObjectFile::eliminate_duplicate_comdat_groups() {
|
||||
for (auto &pair : comdat_groups) {
|
||||
ComdatGroup *group = pair.first;
|
||||
u32 section_idx = pair.second;
|
||||
|
||||
if (group->file == this)
|
||||
continue;
|
||||
|
||||
const ELF64LE::Shdr &shdr = elf_sections[section_idx];
|
||||
ArrayRef<ELF64LE::Word> entries =
|
||||
CHECK(obj.template getSectionContentsAsArray<ELF64LE::Word>(shdr), this);
|
||||
ArrayRef<ELF64LE::Word> entries = pair.second;
|
||||
for (u32 i : entries)
|
||||
sections[i] = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user