re PR target/16343 (invalid code when using -meabi -msdata=eabi)

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
This commit is contained in:
Andreas Fischer 2004-11-27 22:51:43 +00:00 committed by Alan Modra
parent f57fe06890
commit 7482ad259b
2 changed files with 19 additions and 0 deletions

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

View File

@ -17263,6 +17263,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));