From 5ff5b41ca3bbb8cc659d6ccb7b4dcebfa7678a6e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 9 Apr 2012 08:53:27 +0000 Subject: [PATCH] re PR target/52717 (thunk referenced in discarded section when building samba with -flto) PR target/52717 * config/sparc/sparc.c (sparc_file_end): Set TREE_PUBLIC explicitly on the DECL generated for the special GOT helper. From-SVN: r186237 --- gcc/ChangeLog | 6 ++++++ gcc/config/sparc/sparc.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e22bcdd1cf..ee71f7541f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-04-09 Eric Botcazou + + PR target/52717 + * config/sparc/sparc.c (sparc_file_end): Set TREE_PUBLIC explicitly on + the DECL generated for the special GOT helper. + 2012-04-09 Oleg Endo * config/sh/constraints.md: Update list of constraints in diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 71480f8cf20..5c8e8686a18 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -10800,6 +10800,7 @@ sparc_file_end (void) NULL_TREE)); DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL, NULL_TREE, void_type_node); + TREE_PUBLIC (decl) = 1; TREE_STATIC (decl) = 1; make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl)); DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN; -- 2.30.2