From fc01428ca071e3ab70d25a270f25f371cddc4144 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 11 Apr 2019 23:06:22 -0400 Subject: midipix_asm_assemble_integer(): generate GOT references for c++ type info. --- gcc/config/i386/midipix.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'gcc/config/i386') diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index 8b920a8e7..4d511722f 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -587,6 +587,10 @@ bool midipix_asm_assemble_integer(rtx x, unsigned int size, int aligned_p) && (DECL_EXTERNAL(decl)) && (TREE_PUBLIC(decl)); + /* c++ type info */ + falt |= (GET_CODE(xref) == SYMBOL_REF) + && (!(SYMBOL_REF_DECL(xref))); + /* visibility */ visibility = falt && decl && decl->decl_with_vis.visibility_specified ? decl->decl_with_vis.visibility @@ -600,11 +604,20 @@ bool midipix_asm_assemble_integer(rtx x, unsigned int size, int aligned_p) name = XSTR(xref,0); ptrsize = TARGET_64BIT ? winnt_ptrsize_quad : winnt_ptrsize_long; - sect = xoff - ? data_section - : in_section - ? get_variable_section(decl,false) - : 0; + if (in_section == data_section) + sect = data_section; + else if (in_section == readonly_data_section) + sect = readonly_data_section; + if (in_section == ctors_section) + sect = ctors_section; + if (in_section == dtors_section) + sect = dtors_section; + else if (in_section && decl) + sect = get_variable_section(decl,false); + else if (xoff) + sect = data_section; + else + sect = 0; /* in-section mark */ fputs("1:\n",asm_out_file); -- cgit v1.2.3