]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/16343 (invalid code when using -meabi -msdata=eabi)
authorAndreas Fischer <a_fisch@gmx.de>
Sat, 27 Nov 2004 22:57:09 +0000 (22:57 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 27 Nov 2004 22:57:09 +0000 (09:27 +1030)
PR target/16343
* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Disallow
functions, strings and thread-local vars.

Co-Authored-By: Alan Modra <amodra@bigpond.net.au>
From-SVN: r91398

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index aeabbf3e94a447c6febd019870b401edcfa2f413..6717fe694e1fda722426af2b0da44da46ce123d1 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-28  Andreas Fischer <a_fisch@gmx.de>
+           Alan Modra  <amodra@bigpond.net.au>
+
+       PR target/16343
+       * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Disallow
+       functions, strings and thread-local vars.
+
 2004-11-27  Alan Modra  <amodra@bigpond.net.au>
 
        PR target/12769
index 4e48dffe99903c675b0a4c0d6b8bdd0ec98ec23c..197878b573269b52ccf915d096956c2011b1d50d 100644 (file)
@@ -15211,6 +15211,18 @@ rs6000_elf_in_small_data_p (tree decl)
   if (rs6000_sdata == SDATA_NONE)
     return false;
 
+  /* We want to merge strings, so we never consider them small data.  */
+  if (TREE_CODE (decl) == STRING_CST)
+    return false;
+
+  /* Functions are never in the small data area.  */
+  if (TREE_CODE (decl) == FUNCTION_DECL)
+    return false;
+
+  /* Thread-local vars can't go in the small data area.  */
+  if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
+    return false;
+
   if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl))
     {
       const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));