mirror of
https://github.com/rui314/mold.git
synced 2024-12-28 02:44:48 +03:00
wip
This commit is contained in:
parent
2cc93f4fea
commit
3eb3d9edf7
@ -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
1
mold.h
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user