summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/midipix.c22
-rw-r--r--gcc/config/i386/midipix.h3
2 files changed, 14 insertions, 11 deletions
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c
index 9e381124a..10d83f801 100644
--- a/gcc/config/i386/midipix.c
+++ b/gcc/config/i386/midipix.c
@@ -33,9 +33,6 @@
#include "function.h"
#include "cgraph.h"
-/* got support */
-int flag_got_established_section = 0;
-
/* common specs */
const int TARGET_NOP_FUN_DLLIMPORT = 0;
const int use_pe_aligned_common = 1;
@@ -179,11 +176,14 @@ static void midipix_pe_create_got_entry(FILE * stream, const char * name, tree d
static void midipix_asm_reestablish_section(FILE * asmout, section * sect)
{
- flag_got_established_section = 1;
+ section * tree_section;
+
+ tree_section = in_section;
+ in_section = 0;
/* already in section? */
- if (in_section)
- switch_to_section(in_section);
+ if (tree_section)
+ switch_to_section(tree_section);
/* re-establish .bss section */
else if (sect == bss_noswitch_section)
@@ -193,7 +193,11 @@ static void midipix_asm_reestablish_section(FILE * asmout, section * sect)
else if (sect == data_section)
switch_to_section(data_section);
- /* re-establish named section */
+ /* no-switch section */
+ else if (sect && (sect->common.flags & SECTION_NOSWITCH))
+ (void)0;
+
+ /* re-establish generic section */
else if (sect)
switch_to_section(sect);
@@ -598,7 +602,9 @@ bool midipix_asm_assemble_integer(rtx x, unsigned int size, int aligned_p)
sect = xoff
? data_section
- : get_variable_section(decl,false);
+ : in_section
+ ? get_variable_section(decl,false)
+ : 0;
/* in-section mark */
fputs("1:\n",asm_out_file);
diff --git a/gcc/config/i386/midipix.h b/gcc/config/i386/midipix.h
index 304735a20..de9166582 100644
--- a/gcc/config/i386/midipix.h
+++ b/gcc/config/i386/midipix.h
@@ -124,9 +124,6 @@
#undef TARGET_PECOFF
#define TARGET_PECOFF (1)
-#undef TARGET_ASSEMBLY_GOT_ENTRIES
-#define TARGET_ASSEMBLY_GOT_ENTRIES (1)
-
#undef HAS_INIT_SECTION
#define HAS_INIT_SECTION (1)