diff options
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index afbde92f11e..5dbcb228038 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1222,6 +1222,9 @@ assemble_start_function (tree decl, const char *fnname) maybe_assemble_visibility (decl); } + if (DECL_PRESERVE_P (decl)) + targetm.asm_out.mark_decl_preserved (fnname); + /* Do any machine/system dependent processing of the function name. */ #ifdef ASM_DECLARE_FUNCTION_NAME ASM_DECLARE_FUNCTION_NAME (asm_out_file, fnname, current_function_decl); @@ -1562,6 +1565,9 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED, if (TREE_PUBLIC (decl)) maybe_assemble_visibility (decl); + if (DECL_PRESERVE_P (decl)) + targetm.asm_out.mark_decl_preserved (name); + /* Output any data that we will need to use the address of. */ if (DECL_INITIAL (decl) == error_mark_node) reloc = contains_pointers_p (TREE_TYPE (decl)) ? 3 : 0; |