Re: Weak hidden undefined symbol loses hidden visiblity with GCC 4.7.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Henrik, that is interesting. I will try removing weak attribute and
see if that helps. Thanks for the tip.

An update from my own investigation: I am only seeing this problem
with GCC 4.7.2 when I build it from OpenEmbedded "gcc-cross" package
(dylan branch). OpenEmbedded applies a lot of patches to GCC and my
only guess is that one of these patches is causing my problem (or
perhaps something else about OE build environment). When I build GCC
from scratch directly from Gnu distribution for GCC 4.6.4, 4.7.2, or
4.8.2, they all work exactly as expected. In all cases I am using
x86_64 host, arm-linux-gnueabi target. So at this point for me this is
an OpenEmbedded bug, not a GCC bug.

On Thu, May 8, 2014 at 12:31 AM, Henrik Wallin <henrikwallin72@xxxxxxxxx> wrote:
> Hi,
>
> (Reply to: http://gcc.gnu.org/ml/gcc-help/2014-05/msg00005.html)
>
> I think I see the same problems, but for powerpc.
> The problems is seen with gcc 4.8.1. It works good with gcc 4.6.3.
> The original lttng problem can not be seen with an x86 system (not
> sure why yet), but the code snippet below seems to trigger for x86 as
> well.
>
> I've tried to construct a shorted down variant of what I think is happening.
> Hopefully it matches what is happening in the real lttng case.
> I hope it can shed some light to this issue.
> Is it gcc / binutils problem? Or wrong use of attributes from lttng's side?
>
> Attached is a bug.c file. See the comments how to build.
>
> Removing the "weak" attribute will make things work for all tested toolchains.
> I've seen some indications that using weak+hidden might be considered
> "bad practice"
> (e.g. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219)
>
> --
> /  Henrik




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux