bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/17639] Malformed .eh_frame generated with LTO, gold and optimi


From: peter at lekensteyn dot nl
Subject: [Bug gold/17639] Malformed .eh_frame generated with LTO, gold and optimization enabled
Date: Mon, 24 Nov 2014 14:35:44 +0000

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

--- Comment #1 from Peter Wu <peter at lekensteyn dot nl> ---
This bug breaks C++ exceptions too.

==> foo.cpp <==
#include <stdio.h>
void foo(int n) {
    puts("FOO");
    throw 42;
}

==> main.cpp <==
#include <stdio.h>
extern void foo(int x);
int main(void) {
    puts("calling foo");
    try {
        foo(1);
    } catch (int i) {
        printf("Caught %d\n", i);
    }
    puts("done with foo");

With ld.gold (-Wl,-fuse-ld=gold):
calling foo
FOO
Aborted

Without gold:
calling foo
FOO
Caught 42
done with foo

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