https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271

--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Ok, compiling:
int bar = 0;
extern int bar_alias __attribute__((weak, alias("bar")));
main()
{
  printf ("%i %i\n",bar,bar_alias);
}

as a static library leads to no dynamic relocations, but compiling as shared we
get bar_alias still declared weak which affects the dynamic linking (because it
can be replaced by strong definition which come later in the linking process).
So all we need to do is to avoid turning WEAK to non-WEAK for non-hidden
symbols when building with PIC?

Reply via email to