From 53d53a0ccce9d64620df27dbec3aa58eb09d7f79 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 25 Nov 2015 08:23:47 -0500 Subject: midipix targets: GOT entries: account for a re-established section directive. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- gcc/config/i386/midipix.c | 9 +++++++-- gcc/config/i386/midipix.h | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc/config/i386') diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index f9b6d4190..5e206f87a 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -33,6 +33,9 @@ #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; @@ -193,16 +196,18 @@ void midipix_asm_output_got_entry( in_section->named.decl); /* re-establish .bss section */ - else if (sect == bss_noswitch_section) + else if ((sect == bss_noswitch_section) || (in_section == bss_noswitch_section)) fputs("\t.bss\n",asmout); /* re-establish .data section */ - else if (sect == data_section) + else if ((sect == data_section) || (sect == data_section)) fputs("\t.data\n",asmout); /* re-establish .text section (default) */ else fputs("\t.text\n",asmout); + + flag_got_established_section = 1; } diff --git a/gcc/config/i386/midipix.h b/gcc/config/i386/midipix.h index e622c3224..925c3ad96 100644 --- a/gcc/config/i386/midipix.h +++ b/gcc/config/i386/midipix.h @@ -124,6 +124,9 @@ #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) -- cgit v1.2.3