Commit 7482ad25 by Andreas Fischer Committed by Alan Modra

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
parent f57fe068
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.
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment