summaryrefslogtreecommitdiff
path: root/gold/target-reloc.h
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2009-08-05 20:51:56 +0000
committerSriraman Tallam <tmsriram@google.com>2009-08-05 20:51:56 +0000
commitef15dade898122c47e0f7dc0f48c1399c444afdd (patch)
treecd0de8656f3097a835ddfdc5bf0c51f12aed23f3 /gold/target-reloc.h
parent9cc305ec2050ff3cda567d40cf87a2814d8d2ff3 (diff)
downloadbinutils-gdb-ef15dade898122c47e0f7dc0f48c1399c444afdd.tar.gz
*** empty log message ***
Diffstat (limited to 'gold/target-reloc.h')
-rw-r--r--gold/target-reloc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index 4fcbfa33e9e..d93e7552888 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -218,12 +218,14 @@ relocate_section(
// If the local symbol belongs to a section we are discarding,
// and that section is a debug section, try to find the
// corresponding kept section and map this symbol to its
- // counterpart in the kept section.
+ // counterpart in the kept section. The symbol must not
+ // correspond to a section we are folding.
bool is_ordinary;
unsigned int shndx = psymval->input_shndx(&is_ordinary);
if (is_ordinary
&& shndx != elfcpp::SHN_UNDEF
- && !object->is_section_included(shndx))
+ && !object->is_section_included(shndx)
+ && !(relinfo->symtab->is_section_folded(object, shndx)))
{
if (comdat_behavior == CB_UNDETERMINED)
{