bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/16417] executable linked with gold segfaults before main


From: markus at trippelsdorf dot de
Subject: [Bug gold/16417] executable linked with gold segfaults before main
Date: Thu, 03 Apr 2014 16:15:22 +0000

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> ---
address@hidden 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);
}
address@hidden tmp % g++ -pthread -O2 print_exports.ii -Wl,--as-needed
address@hidden tmp % ./a.out
[1]    8353 segmentation fault  ./a.out
address@hidden tmp % nm a.out | grep pthread
                 w __pthread_key_create
address@hidden 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)


address@hidden tmp % g++ -pthread -O2 print_exports.ii -Wl,--as-needed
-Wl,-fuse-ld=bfd
address@hidden tmp % ./a.out
address@hidden tmp % nm a.out | grep pthread
                 w __pthread_key_create@@GLIBC_2.2.5
address@hidden 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)
address@hidden tmp %

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]