This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Another AIX Bootstrap failure
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Jun 2014 18:50:56 +0200
- Subject: Re: Another AIX Bootstrap failure
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnykZKOiQhM-N6TTCPa_E0d0TCK_PYs9bL_YZTJ7E193eUQ at mail dot gmail dot com> <20140616043557 dot GA6530 at kam dot mff dot cuni dot cz> <CAGWvnyk+fot-uRkE1LhW33p9HHR5CWPBY5OrK+GvJghmtYOu+w at mail dot gmail dot com> <20140616220638 dot GA12228 at kam dot mff dot cuni dot cz> <CAGWvny=YjWbHiewdK6Lan7OL9fLyyrB2i3tNzDQ4xh-tA0b_Rw at mail dot gmail dot com> <20140617034447 dot GA28053 at kam dot mff dot cuni dot cz> <CAGWvny=xow52i27Xk84j1TL4d5UD2HNSK4AE+xGBopu4m7c+Lg at mail dot gmail dot com>
> > To avoid using PLT and GOT when the unit refers to the symbol and we know
> > that interposition does not matter.
>
> I am not certain if the linker is creating the PLT stub code because
> it wants to allow interpolation or because it cannot see a definition
> of the function and wants to allow for some other shared library to
> provide the definition at runtime.
OK, but the definition appears in the same file..
>
> > Why branch to a non-global (static) symbol
> > b ._ZN14__gnu_parallel9_SettingsC1Ev.localalias.0
> > leads to PLT stub here and why branching to such symbols seems to work otherwise?
>
> Branching to non-global (static) symbol, even an alias, is working
> here. The weak function seems to be the problem.
>
> > The failing branch is
> >> b ._ZN14__gnu_parallel9_SettingsC1Ev.localalias.0
> > so the call to static construction seems to have happened correctly but we can
> > not get right the call from the constructor to static function (that is an alias
> > of a global symbol)
>
> The linker appears to not want to resolve the weak function. If I
> change ._ZN14__gnu_parallel9_SettingsC1Ev to lglobl, it works. If I
> change the static constructor to call the weak function directly,
> avoiding the alias, it shows the same failure mode.
>
> I don't know what code generation looked like before. Was GCC
> generating calls to weak functions within the same file?
Yes, this is how you implement COMDAT functions, right? I looked at rs6000 call
expansion and it does not seem to care about visibility properties (just about
direct wrt indirect call).
One problem I can think of is a scenario where linked unify calls comdat functoins
in between units somehow forgetting about the aliases, but this function seems to
not be shared.
Index: symtab.c
===================================================================
--- symtab.c (revision 211693)
+++ symtab.c (working copy)
@@ -1327,10 +1327,8 @@
(void *)&new_node, true);
if (new_node)
return new_node;
-#ifndef ASM_OUTPUT_DEF
/* If aliases aren't supported by the assembler, fail. */
return NULL;
-#endif
/* Otherwise create a new one. */
new_decl = copy_node (node->decl);
disable generation of the local aliases completely. I do not see much of difference
in the actual codegen with this...
I will check older GCC
Honza
>
> Thanks, David