This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld-related bug in LTTng
- From: Martin Ãnsal <martinunsal at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 2 May 2014 15:40:10 -0700
- Subject: Re: ld-related bug in LTTng
- Authentication-results: sourceware.org; auth=none
- References: <CACsXv7DMNwLfR521KXEw7SkN7Y8Tm13m+=x_T9yuWMcT-SiRpQ at mail dot gmail dot com> <20140501073529 dot GI16139 at bubble dot grove dot modra dot org> <CACsXv7BvXJR7+R_tTLk623Oez1ihhe1mL5HjowYqTunxsV_zqQ at mail dot gmail dot com> <20140501232327 dot GJ16139 at bubble dot grove dot modra dot org>
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.
Thanks for the help,
Martin