mirror of
https://github.com/rui314/mold.git
synced 2025-01-07 18:02:15 +03:00
wip
This commit is contained in:
parent
6a5ce0bc07
commit
754eb455bf
28
icf.cc
28
icf.cc
@ -169,13 +169,12 @@ static void gather_sections(std::vector<Digest> &digests,
|
|||||||
InputSection &isec = *sections[i];
|
InputSection &isec = *sections[i];
|
||||||
|
|
||||||
for (i64 j = 0; j < isec.rels.size(); j++) {
|
for (i64 j = 0; j < isec.rels.size(); j++) {
|
||||||
if (isec.has_fragments[j])
|
if (!isec.has_fragments[j]) {
|
||||||
continue;
|
ElfRela &rel = isec.rels[j];
|
||||||
|
Symbol &sym = *isec.file->symbols[rel.r_sym];
|
||||||
ElfRela &rel = isec.rels[j];
|
if (!sym.fragref.frag && sym.input_section)
|
||||||
Symbol &sym = *isec.file->symbols[rel.r_sym];
|
num_edges[i]++;
|
||||||
if (!sym.fragref.frag && sym.input_section)
|
}
|
||||||
num_edges[i]++;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -190,15 +189,14 @@ static void gather_sections(std::vector<Digest> &digests,
|
|||||||
i64 idx = edge_indices[i];
|
i64 idx = edge_indices[i];
|
||||||
|
|
||||||
for (i64 j = 0; j < isec.rels.size(); j++) {
|
for (i64 j = 0; j < isec.rels.size(); j++) {
|
||||||
if (isec.has_fragments[j])
|
if (!isec.has_fragments[j]) {
|
||||||
continue;
|
ElfRela &rel = isec.rels[j];
|
||||||
|
Symbol &sym = *isec.file->symbols[rel.r_sym];
|
||||||
|
|
||||||
ElfRela &rel = isec.rels[j];
|
if (!sym.fragref.frag && sym.input_section) {
|
||||||
Symbol &sym = *isec.file->symbols[rel.r_sym];
|
assert(sym.input_section->icf_idx != -1);
|
||||||
|
edges[idx++] = sym.input_section->icf_idx;
|
||||||
if (!sym.fragref.frag && sym.input_section) {
|
}
|
||||||
assert(sym.input_section->icf_idx != -1);
|
|
||||||
edges[idx++] = sym.input_section->icf_idx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user