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: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
[hjl@gnu-6 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;
}
[hjl@gnu-6 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
[hjl@gnu-6 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.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils