https://sourceware.org/bugzilla/show_bug.cgi?id=16417

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot de

--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> ---
markus@x4 tmp % cat print_exports.ii
static __typeof 0 a __attribute__ ((__weakref__ ("__pthread_key_create")));
void *b = &a;
namespace std
{
class A
{
public:
  A (void *);
};
class ios_base
{
public:
  class Init
  {
  public:
    Init ();
  };
};
ios_base::Init c;
}

int main ()
{
  for (int d; 0;)
    std::A e (&d);
}
markus@x4 tmp % g++ -pthread -O2 print_exports.ii -Wl,--as-needed
markus@x4 tmp % ./a.out
[1]    8353 segmentation fault  ./a.out
markus@x4 tmp % nm a.out | grep pthread
                 w __pthread_key_create
markus@x4 tmp % ldd ./a.out
        linux-vdso.so.1 (0x00007fff709ff000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/libstdc++.so.6
(0x00007fb001be9000)
        libc.so.6 => /lib/libc.so.6 (0x00007fb0017a1000)
        libm.so.6 => /lib/libm.so.6 (0x00007fb001512000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb001b18000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fb001bd0000)


markus@x4 tmp % g++ -pthread -O2 print_exports.ii -Wl,--as-needed
-Wl,-fuse-ld=bfd
markus@x4 tmp % ./a.out
markus@x4 tmp % nm a.out | grep pthread
                 w __pthread_key_create@@GLIBC_2.2.5
markus@x4 tmp % ldd ./a.out
        linux-vdso.so.1 (0x00007fff599ff000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/libstdc++.so.6
(0x00007f25053ac000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f25050bd000)
        libc.so.6 => /lib/libc.so.6 (0x00007f2504d46000)
        libm.so.6 => /lib/libm.so.6 (0x00007f2504ab7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f25052db000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f2505393000)
markus@x4 tmp %

-- 
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

Reply via email to