diff mbox

[SPARC] Fix gcc.dg/pr46685.c

Message ID 201012302231.53821.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Dec. 30, 2010, 9:31 p.m. UTC
This patchlet fixes the regression of gcc.dg/pr46685.c that appeared recently 
on the SPARC.  We were forgetting to call resolve_unique_section for the GOT 
helper that is manually emitted.

Tested on SPARC/Solaris 32-bit and 64-bit, applied on the mainline.  I will 
backport it to the 4.5 branch later.


2010-12-30  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/47038
	* config/sparc/sparc.c (sparc_file_end): Call resolve_unique_section
	on the GOT helper if USE_HIDDEN_LINKONCE.
diff mbox

Patch

Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c	(revision 168068)
+++ config/sparc/sparc.c	(working copy)
@@ -9534,6 +9534,7 @@  sparc_file_end (void)
 	  make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
 	  DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
 	  DECL_VISIBILITY_SPECIFIED (decl) = 1;
+	  resolve_unique_section (decl, 0, flag_function_sections);
 	  allocate_struct_function (decl, true);
 	  cfun->is_thunk = 1;
 	  current_function_decl = decl;