From: Cary Coutant Date: Thu, 1 May 2008 02:01:23 +0000 (+0000) Subject: * target-reloc.h (relocate_section): Fix dead-pointer bug. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4418b2d587cab23c5257683aaf40dbdb6a091782;p=binutils-gdb.git * target-reloc.h (relocate_section): Fix dead-pointer bug. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index c0612930773..246cf08ada5 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,7 @@ 2008-04-30 Cary Coutant + * target-reloc.h (relocate_section): Fix dead-pointer bug. + * layout.cc (Layout::include_section): Refactored check for debug info section. (Layout::add_comdat): Add new parameters. Change type diff --git a/gold/target-reloc.h b/gold/target-reloc.h index e1c3cc37b69..d06dc82023b 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) {