This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fdata-sections implies no .sdata


When -fdata-sections is in effect then small data never goes to .sdata, so
we cannot use @gprel.  Since ia64_encode_section_info is called before
resolve_unique_sections it must check flag_data_sections itself.

Andreas.

2002-05-13  Andreas Schwab  <schwab@suse.de>

	* config/ia64/ia64.c (ia64_encode_section_info): Handle
	-fdata-sections.

--- gcc/config/ia64/ia64.c.~1.139.2.15.~	2002-04-19 11:03:03.000000000 +0200
+++ gcc/config/ia64/ia64.c	2002-05-13 16:10:52.000000000 +0200
@@ -6909,10 +6909,12 @@ ia64_encode_section_info (decl)
       /* Either the variable must be declared without a section attribute,
 	 or the section must be sdata or sbss.  */
       && (DECL_SECTION_NAME (decl) == 0
-	  || ! strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
+	  /* -fdata-sections has not been considered yet.  */
+	  ? ! flag_data_sections
+	  : (! strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
 		       ".sdata")
-	  || ! strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
-		       ".sbss")))
+	     || ! strcmp (TREE_STRING_POINTER (DECL_SECTION_NAME (decl)),
+			  ".sbss"))))
     {
       HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
 

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]