ld-related bug in LTTng
Alan Modra
amodra@gmail.com
Sat May 3 13:34:00 GMT 2014
On Fri, May 02, 2014 at 03:40:10PM -0700, Martin Ãnsal wrote:
> On Thu, May 1, 2014 at 4:23 PM, Alan Modra <amodra@gmail.com> wrote:
> > Is gcc emitting the reference to __start___tracepoints_ptrs as hidden?
> > (Look at an object with readelf -s to see)
>
> Aha! No, it isn't.
>
> With GCC 4.6.4 the symbol is correctly emitted as hidden visibility:
>
> $ arm-linux-gnueabi-readelf -s pmtrace_bundle_provider.o | grep __start_
> 153: 00000000 0 NOTYPE WEAK HIDDEN UND __start___tracepoints_ptr
>
> With GCC 4.7.2 the symbol is incorrectly emitted as default visibility:
>
> $ arm-linux-gnueabi-readelf -s pmtrace_bundle_provider.o | grep __start_
> 144: 00000000 0 NOTYPE WEAK DEFAULT UND __start___tracepoints_ptr
>
> Here is the declaration:
>
> extern struct tracepoint * const __start___tracepoints_ptrs[]
> __attribute__((weak, visibility("hidden")));
>
> This looks like it is clearly a compiler issue. I will take this back
> to gcc-help mailing list.
It might be worth checking the assembly output, to rule out as
assembler issue. gcc -S with
extern void *const x __attribute__ ((weak, visibility ("hidden")));
void *const foo (void) { return x; }
on my powerpc 4.7.2 compiler emits
...
.weak x
.hidden x
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list