This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[google/4.6] Fix problem where -gfission emits duplicate strings (issue5824050)
- From: ccoutant at google dot com (Cary Coutant)
- To: reply at codereview dot appspotmail dot com,saugustine at google dot com,gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 Mar 2012 11:15:24 -0700 (PDT)
- Subject: [google/4.6] Fix problem where -gfission emits duplicate strings (issue5824050)
This is for the google/gcc-4_6 branch only.
Fix output_indirect_string so that it does not output strings that
have already been written to the .debug_str.dwo section.
This is a backport of part of an unrelated change from upstream 4.7:
http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00130.html
Tested: bootstrap, core, mantle, crust (in progress).
2012-03-14 Cary Coutant <ccoutant@google.com>
* dwarf2out.c (output_indirect_string): Check for DW_FORM_strp
instead of presence of label and non-zero refcount.
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 185269)
+++ dwarf2out.c (working copy)
@@ -23042,7 +23042,7 @@ output_indirect_string (void **h, void *
{
struct indirect_string_node *node = (struct indirect_string_node *) *h;
- if (node->label && node->refcount)
+ if (node->form == DW_FORM_strp)
{
switch_to_section (debug_str_section);
ASM_OUTPUT_LABEL (asm_out_file, node->label);
--
This patch is available for review at http://codereview.appspot.com/5824050