From a8e2f17947a53da34dab7b0b6050ea2eee326bc5 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Thu, 4 Nov 1993 18:21:23 +0000 Subject: [PATCH] (assemble_variable): Set DECL_IN_TEXT_SECTION somewhat earlier. From-SVN: r5994 --- gcc/varasm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/varasm.c b/gcc/varasm.c index 0d16e67698f..013be976ad0 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1103,6 +1103,10 @@ assemble_variable (decl, top_level, at_end, dont_output_data) data_section (); #endif + /* dbxout.c needs to know this. */ + if (in_text_section ()) + DECL_IN_TEXT_SECTION (decl) = 1; + /* Record current section so we can restore it if dbxout.c clobbers it. */ saved_in_section = in_section; @@ -1129,6 +1133,8 @@ assemble_variable (decl, top_level, at_end, dont_output_data) while we are doing our final traversal of the chain of file-scope declarations. */ + /* If the debugging output changed sections, reselect the section + that's supposed to be selected. */ if (in_section != saved_in_section) { /* Switch to the proper section for this data. */ @@ -1144,10 +1150,6 @@ assemble_variable (decl, top_level, at_end, dont_output_data) #endif } - /* dbxout.c needs to know this. */ - if (in_text_section ()) - DECL_IN_TEXT_SECTION (decl) = 1; - /* Compute and output the alignment of this data. */ align = DECL_ALIGN (decl); -- 2.30.2