diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-10-13 05:08:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-10-13 05:08:39 -0700 |
commit | 1fb1d64f4a7c817f91a164dc22d5a22a0e75c1b8 (patch) | |
tree | 81d577a5a5ff88fd565ec93bb528c6cd9bfbc66a /gold/icf.cc | |
parent | 1b71cfcfdc3e13a655fefa6566b5564cec044c10 (diff) | |
download | gdb-1fb1d64f4a7c817f91a164dc22d5a22a0e75c1b8.zip gdb-1fb1d64f4a7c817f91a164dc22d5a22a0e75c1b8.tar.gz gdb-1fb1d64f4a7c817f91a164dc22d5a22a0e75c1b8.tar.bz2 |
Gold: Skip zero-sized sections for ICF
Skip zero-sized sections since there is no need to do ICF on them.
* icf.cc (Icf::find_identical_sections): Skip zero-sized sections.
Diffstat (limited to 'gold/icf.cc')
-rw-r--r-- | gold/icf.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/icf.cc b/gold/icf.cc index a60db7a..54af412 100644 --- a/gold/icf.cc +++ b/gold/icf.cc @@ -973,6 +973,8 @@ Icf::find_identical_sections(const Input_objects* input_objects, for (unsigned int i = 0; i < (*p)->shnum(); ++i) { + if ((*p)->section_size(i) == 0) + continue; const std::string section_name = (*p)->section_name(i); if (!is_section_foldable_candidate(section_name)) { |