1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-27 10:23:41 +03:00
This commit is contained in:
Rui Ueyama 2021-01-25 14:31:40 +09:00
parent 239321cc01
commit 63789c4576
3 changed files with 2 additions and 7 deletions

View File

@ -39,7 +39,6 @@ static void visit(InputSection *isec,
void gc_sections() {
Timer t("gc_sections");
tbb::concurrent_vector<InputSection *> roots;
// Add sections that are not subject to garbage collection.
@ -92,7 +91,7 @@ void gc_sections() {
for (i64 i = 0; i < file->sections.size(); i++) {
InputSection *isec = file->sections[i];
if (isec && isec->is_alive && !isec->is_ehframe && !isec->is_visited) {
if (isec && isec->is_alive && !isec->is_visited) {
if (config.print_gc_sections)
SyncOut() << "removing unused section " << *isec;
file->kill(i);

View File

@ -191,6 +191,7 @@ void ObjectFile::initialize_ehframe_sections() {
if (isec && isec->name == ".eh_frame") {
read_ehframe(*isec);
isec->is_ehframe = true;
sections[i] = nullptr;
}
}
}

View File

@ -836,11 +836,6 @@ void EhFrameSection::construct() {
}
cie.fde_size = offset;
}
for (i64 i = 0; i < file->sections.size(); i++) {
if (file->sections[i] && file->sections[i]->is_ehframe)
file->sections[i] = nullptr;
}
});
// Aggreagate CIEs.