aboutsummaryrefslogtreecommitdiff
path: root/vtable-security/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtable-security/gcc/varasm.c')
-rw-r--r--vtable-security/gcc/varasm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vtable-security/gcc/varasm.c b/vtable-security/gcc/varasm.c
index 1aa8731f68a..f94121755d3 100644
--- a/vtable-security/gcc/varasm.c
+++ b/vtable-security/gcc/varasm.c
@@ -2063,6 +2063,19 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
}
}
+void
+assemble_vtv_preinit_initializer (tree fn_decl)
+{
+ section *sect;
+ unsigned flags = SECTION_WRITE;
+ rtx symbol = XEXP (DECL_RTL (fn_decl), 0);
+
+ flags |= SECTION_NOTYPE;
+ sect = get_section (".preinit_array", flags, fn_decl);
+ switch_to_section (sect);
+ assemble_addr_to_section (symbol, sect);
+}
+
/* Return 1 if type TYPE contains any pointers. */
static int