https://sourceware.org/bugzilla/show_bug.cgi?id=18327
Bug ID: 18327 Summary: Exception frame merging is broken in gold Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: ian at airs dot com CC: ian at airs dot com Exception frame merging is broken on mainline. When two CIEs are merged, reloc processing is not being applied to subsequent CIEs. This causes the personality function to not be defined. Compile these two C++ files without optimization and link them in order. ================================ void bar() { } ================================ #include <iostream> #include <cstdlib> void foo() { } int main() { try { throw(1); } catch(int) { std::cout << "caught" << std::endl; exit(0); } std::cout << "failed" << std::endl; exit(1); } =================================== The resulting program, when run, should print "caught". When I link it with tip gold, I get terminate called after throwing an instance of 'int' Aborted The reason is that the personality routine in the exception frame info is not set. It should have been set by applying relocation processing to the CIE data. Note that relocation processing is normally applied *after* EH frame merging. I suspect https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=dbe40a889191708b6e32441b1c64937844645574 but I don't know if that is actually the problem. -- 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