diff mbox

Symtab cleanups 2/17 - merge alias code

Message ID 20130607195816.GC29599@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka June 7, 2013, 7:58 p.m. UTC
> > On 1 June 2013 14:06, Jan Hubicka <hubicka@ucw.cz> wrote:
> > > Hi,
> > > this patch cleanups way we handle aliases.  The main point is to merge code
> > > that was previously done separately for variables and functions.
> > >
> > 
> > Hello,  This patch appears to break both arm and aarch64.  I don't
> > fully understand the mechanism.  The issue shows up when building
> > res_libc.o over in glibc. The following fragment demonstrates the
> > issue:
> > 
> > I suspect the section anchor appeared because
> > varasm.c:use_blocks_for_decl_p test for an 'alias' failed.
> 
> You are probably right.  I added code that removes alias attributes once
> they land symtab. The reason is that I run into wrong code issues with code
> picking up the symbol name from alias attribute that is no longer valid
> after LTO renaming.
> Apparently this code and also symbol equality testing in fold-const rely
> on alias attribute but do not worry about what alias it is.
> I will revert this part of patch and try to solve this incrementally.
> (the code in fold-const is wrong anyway)
Hi,
I have comitted the following.  Does it solve your problem?

Honza

Comments

Marcus Shawcroft June 8, 2013, 7:34 a.m. UTC | #1
On 7 June 2013 20:58, Jan Hubicka <hubicka@ucw.cz> wrote:

> Hi,
> I have comitted the following.  Does it solve your problem?
>
> Honza
>
> Index: ChangeLog
> ===================================================================
> --- ChangeLog   (revision 199834)
> +++ ChangeLog   (working copy)
> @@ -1,3 +1,7 @@
> +2013-06-07  Jan Hubicka  <jh@suse.cz>
> +
> +       * symtab.c (symtab_resolve_alias): Do not remove alias attribute.
> +

Honza, This fixes the issue I had with TLS.

Thank you.

/Marcus
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 199834)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2013-06-07  Jan Hubicka  <jh@suse.cz>
+
+	* symtab.c (symtab_resolve_alias): Do not remove alias attribute.
+
 2013-06-07  David Malcolm  <dmalcolm@redhat.com>
 
 	* tree-object-size.c (unknown): Make const.
Index: symtab.c
===================================================================
--- symtab.c	(revision 199698)
+++ symtab.c	(working copy)
@@ -978,8 +978,6 @@  symtab_resolve_alias (symtab_node node,
      We do not want to keep it around or we would have to mind updating them
      when renaming symbols.  */
   node->symbol.alias_target = NULL;
-  DECL_ATTRIBUTES (node->symbol.decl)
-     = remove_attribute ("alias", DECL_ATTRIBUTES (node->symbol.decl));
 
   if (node->symbol.cpp_implicit_alias && cgraph_state >= CGRAPH_STATE_CONSTRUCTION)
     fixup_same_cpp_alias_visibility (node, target);