Commit 726f0774 by Jan Hubicka Committed by Jan Hubicka

varasm.c (get_variable_section): Walk aliases.


	* varasm.c (get_variable_section): Walk aliases.
	(place_block_symbol): Walk aliases.

From-SVN: r211045
parent 88650827
2014-05-28 Jan Hubicka <hubicka@ucw.cz>
* varasm.c (get_variable_section): Walk aliases.
(place_block_symbol): Walk aliases.
2014-05-28 Tom de Vries <tom@codesourcery.com>
Revert:
......
......@@ -1083,6 +1083,9 @@ get_variable_section (tree decl, bool prefer_noswitch_p)
{
addr_space_t as = ADDR_SPACE_GENERIC;
int reloc;
symtab_node *snode = symtab_get_node (decl);
if (snode)
decl = symtab_alias_ultimate_target (snode)->decl;
if (TREE_TYPE (decl) != error_mark_node)
as = TYPE_ADDR_SPACE (TREE_TYPE (decl));
......@@ -7084,7 +7087,16 @@ place_block_symbol (rtx symbol)
}
else
{
struct symtab_node *snode;
decl = SYMBOL_REF_DECL (symbol);
snode = symtab_get_node (decl);
if (snode->alias)
{
rtx target = DECL_RTL (symtab_alias_ultimate_target (snode)->decl);
SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target);
return;
}
alignment = get_variable_align (decl);
size = tree_to_uhwi (DECL_SIZE_UNIT (decl));
if ((flag_sanitize & SANITIZE_ADDRESS)
......
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