1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-28 02:44:48 +03:00
This commit is contained in:
Rui Ueyama 2021-01-25 18:34:39 +09:00
parent 2cc93f4fea
commit 3eb3d9edf7
2 changed files with 2 additions and 1 deletions

View File

@ -41,12 +41,12 @@ void gc_sections() {
Timer t("gc_sections"); Timer t("gc_sections");
tbb::concurrent_vector<InputSection *> roots; tbb::concurrent_vector<InputSection *> roots;
// Add sections that are not subject to garbage collection.
auto enqueue = [&](InputSection *isec) { auto enqueue = [&](InputSection *isec) {
if (mark_section(isec)) if (mark_section(isec))
roots.push_back(isec); roots.push_back(isec);
}; };
// Add sections that are not subject to garbage collection.
tbb::parallel_for_each(out::objs, [&](ObjectFile *file) { tbb::parallel_for_each(out::objs, [&](ObjectFile *file) {
for (InputSection *isec : file->sections) { for (InputSection *isec : file->sections) {
if (!isec) if (!isec)

1
mold.h
View File

@ -259,6 +259,7 @@ public:
InputFile *file = nullptr; InputFile *file = nullptr;
const ElfSym *esym = nullptr; const ElfSym *esym = nullptr;
InputSection *input_section = nullptr; InputSection *input_section = nullptr;
SectionFragment *frag = nullptr;
SectionFragmentRef fragref; SectionFragmentRef fragref;
u64 value = -1; u64 value = -1;