// gc.h -- garbage collection of unused sections
-// Copyright (C) 2009-2019 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.
bool check_section_for_function_pointers = false;
if (parameters->options().icf_enabled()
- && is_section_foldable_candidate(src_section_name.c_str()))
+ && (is_section_foldable_candidate(src_section_name)
+ || is_prefix_of(".eh_frame", src_section_name.c_str())))
{
is_icf_tracked = true;
Section_id src_id(src_obj, src_indx);