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: r91397
+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-28 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.h (WORLD_SAVE_P): Define.
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));