https://sourceware.org/bugzilla/show_bug.cgi?id=21964
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Michael Matz from comment #4) > Created attachment 10353 [details] > Tentative patch > > Well, the problem is quite obvious. Just compile this: > > % cat t.c > #include <assert.h> > extern void * __start___verbose, * __stop___verbose; > int foo(void) > { > static int my_var __attribute__((section("__verbose"))) = 5; > if (__start___verbose == __stop___verbose) assert(0); > if (my_var == 5) return 0; > else return -1; > } > % gcc -c -fPIC t.c > % ./ld/ld-new -shared t.o > % readelf -rsW a.out > ... > > It should have __start___verbose in the dynamic symbols but hasn't. > FWIW, I've come up with this patch. The idea is to make the symbols > protected > and always resolve them locally even if the (completely broken IMHO, but > that's an old story) extern_protected_data flag says otherwise. Please provide a run-time testcase with dlsym. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils