From 14948c31be2f4d3bc140d3e67cad3ba1e85fb357 Mon Sep 17 00:00:00 2001 From: amacleod Date: Mon, 14 Dec 1998 14:19:48 +0000 Subject: [PATCH] * output.h (force_data_section): New prototype. * varasm.c (force_data_section): New function to force the data section, regardless of what in_section thinks. * dwarf2out.c (output_call_frame_info): Call force_data_section since varasm may not realize we've changes sections. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24311 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/dwarf2out.c | 2 +- gcc/output.h | 3 +++ gcc/varasm.c | 9 +++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb45298..526c539 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Mon Dec 14 17:13:36 EST 1998 Andrew MacLeod + + * output.h (force_data_section): New prototype. + * varasm.c (force_data_section): New function to force the + data section, regardless of what in_section thinks. + * dwarf2out.c (output_call_frame_info): Call force_data_section + since varasm may not realize we've changes sections. + Mon Dec 14 14:09:34 1998 Nick Clifton * reload1.c (reload): Delete REG_RETVAL and REG_LIBCALL notes diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8661080..8f99206 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1691,7 +1691,7 @@ output_call_frame_info (for_eh) #else tree label = get_file_function_name ('F'); - data_section (); + force_data_section (); ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); ASM_GLOBALIZE_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); diff --git a/gcc/output.h b/gcc/output.h index 4082e62..4fcce0b 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -142,6 +142,9 @@ extern void text_section PROTO((void)); /* Tell assembler to switch to data section. */ extern void data_section PROTO((void)); +/* Tell assembler to make sure its in the data section. */ +extern void force_data_section PROTO((void)); + /* Tell assembler to switch to read-only data section. This is normally the text section. */ extern void readonly_data_section PROTO((void)); diff --git a/gcc/varasm.c b/gcc/varasm.c index e47a0cd..343c603 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -216,6 +216,15 @@ data_section () in_section = in_data; } } +/* Tell assembler to ALWAYS switch to data section, in case + it's not sure where it it. */ + +void +force_data_section () +{ + in_section = no_section; + data_section (); +} /* Tell assembler to switch to read-only data section. This is normally the text section. */ -- 2.7.4