diff options
author | midipix <writeonce@midipix.org> | 2019-02-05 03:01:23 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-02-17 22:35:50 -0500 |
commit | 13e4ec00bfb4c07ecf06ba9c2e7462a0dc98b3d8 (patch) | |
tree | 53a4eb21ecc59fad6236c70032c8316524c8e7e8 /gcc/config | |
parent | 6afa9b89deb44fc9742f195c585ba6dd97a80795 (diff) | |
download | cbb-gcc-4.6.4-13e4ec00bfb4c07ecf06ba9c2e7462a0dc98b3d8.tar.bz2 cbb-gcc-4.6.4-13e4ec00bfb4c07ecf06ba9c2e7462a0dc98b3d8.tar.xz |
midipix_asm_reestablish_section(): better integrate with gcc's varasm logic.
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/midipix.c | 22 | ||||
-rw-r--r-- | gcc/config/i386/midipix.h | 3 |
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) |