bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/13195] New: -ffunction-sections -Wl,--gc-sections failure with C


From: hjl.tools at gmail dot com
Subject: [Bug ld/13195] New: -ffunction-sections -Wl,--gc-sections failure with C++ code
Date: Fri, 16 Sep 2011 22:16:17 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13195

             Bug #: 13195
           Summary: -ffunction-sections -Wl,--gc-sections failure with C++
                    code
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


address@hidden tmp]$ cat gcsec1.C
extern "C" void abort (void);

int g = 0;

void raise_exception()
{
  throw 1;
}

void used()
{
  try {
    raise_exception ();
  }
  catch (int) {
    g = 1;
  }
}

void unused()
{
  try {
    raise_exception ();
  }
  catch (int) {
    g = 1;
  }
}

int main()
{
  used ();

  if (g != 1)
    abort ();

  return 0;
}
address@hidden tmp]$ g++ gcsec1.C -ffunction-sections -Wl,--gc-sections 
/usr/local/bin/ld: a.out: local symbol `__tls_get_addr@@GLIBC_2.3' in
/lib64/ld-linux-x86-64.so.2 is referenced by DSO
/usr/local/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
address@hidden tmp]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]