diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-08-09 12:42:21 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-08-09 12:42:21 -0700 |
commit | 05be4ceac49b1d6960045eb2121530582202776e (patch) | |
tree | 7a0eebe2006eb43a5c2e35275bba6781449f8cdc /gcc | |
parent | 211b330fd8f17c6be56de8048edb5ab0a1633220 (diff) | |
download | gcc-05be4ceac49b1d6960045eb2121530582202776e.zip gcc-05be4ceac49b1d6960045eb2121530582202776e.tar.gz gcc-05be4ceac49b1d6960045eb2121530582202776e.tar.bz2 |
(assembler_variable): For XCOFF_DEBUG, restore section
if dbxout_symbol call changes it.
From-SVN: r5122
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/varasm.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 75f620a..e117876 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1048,7 +1048,26 @@ assemble_variable (decl, top_level, at_end, dont_output_data) /* File-scope global variables are output here. */ if (write_symbols == XCOFF_DEBUG && top_level) - dbxout_symbol (decl, 0); + { + saved_in_section = in_section; + + dbxout_symbol (decl, 0); + + if (in_section != saved_in_section) + { + /* Switch to the proper section for this data. */ +#ifdef SELECT_SECTION + SELECT_SECTION (decl, reloc); +#else + if (TREE_READONLY (decl) + && ! TREE_THIS_VOLATILE (decl) + && ! (flag_pic && reloc)) + readonly_data_section (); + else + data_section (); +#endif + } + } #else /* There must be a statement after a label. */ ; |