[gdb/build] Add CXX_DIALECT to CXX
[deliverable/binutils-gdb.git] / gold / icf.cc
index a60db7abc8d2fc7b7ebde167dcb90dd76d4459d7..0743e57dbedb1f472e02dc0010a2f63801a86516 100644 (file)
@@ -1,6 +1,6 @@
 // icf.cc -- Identical Code Folding.
 //
-// Copyright (C) 2009-2020 Free Software Foundation, Inc.
+// Copyright (C) 2009-2021 Free Software Foundation, Inc.
 // Written by Sriraman Tallam <tmsriram@google.com>.
 
 // This file is part of gold.
@@ -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))
            {
This page took 0.024905 seconds and 4 git commands to generate.