summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-04-11 23:06:22 -0400
committermidipix <writeonce@midipix.org>2019-04-11 23:06:22 -0400
commitfc01428ca071e3ab70d25a270f25f371cddc4144 (patch)
tree3064d4db8d0be8313b7f757feadf5d87d8d4a874 /gcc/config
parent0aaf3a9ba7bd8bbe094c354148ffe986a01ce529 (diff)
downloadcbb-gcc-4.6.4-fc01428ca071e3ab70d25a270f25f371cddc4144.tar.bz2
cbb-gcc-4.6.4-fc01428ca071e3ab70d25a270f25f371cddc4144.tar.xz
midipix_asm_assemble_integer(): generate GOT references for c++ type info.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/midipix.c23
1 files changed, 18 insertions, 5 deletions
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);