summaryrefslogtreecommitdiff
path: root/gold/target-reloc.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2008-05-01 02:01:23 +0000
committerCary Coutant <ccoutant@google.com>2008-05-01 02:01:23 +0000
commit4418b2d587cab23c5257683aaf40dbdb6a091782 (patch)
tree700cd5ff2fb627143aa300f24633d2d407eeede6 /gold/target-reloc.h
parente94cf1277329c4eaba3b398b446e693550463c77 (diff)
* target-reloc.h (relocate_section): Fix dead-pointer bug.
Diffstat (limited to 'gold/target-reloc.h')
-rw-r--r--gold/target-reloc.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index e1c3cc37b6..d06dc82023 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -227,9 +227,8 @@ relocate_section(
{
if (comdat_behavior == CB_UNDETERMINED)
{
- const char* name =
- object->section_name(relinfo->data_shndx).c_str();
- comdat_behavior = get_comdat_behavior(name);
+ std::string name = object->section_name(relinfo->data_shndx);
+ comdat_behavior = get_comdat_behavior(name.c_str());
}
if (comdat_behavior == CB_PRETEND)
{