[llvm-dev] [RFC] Making .eh_frame more linker-friendly
Eric Tsai via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 5 16:02:19 PDT 2021
I recently encountered a situation related to this. I think the issue is more severe than Rui Ueyama has found. The test case is in Plumhall_lvs15a-LVS051/src/lvs15a/conform/t279.dir. The main module has std::ios_base::clear(std::_Iosb<int>::_Iostate, bool) and the linked library iostream.o(libstdc++11.a) has function with same name too. These two functions have minor difference due to optimization at different build time. So, the .text, .eh_frame and .gcc_except_table are not the same. Although there is only one copy of function std::ios_base::clear(std::_Iosb<int>::_Iostate, bool), the one in iostream.o has been discarded after linking, but there are two copies of .eh_frame and .gcc_except_table for std::ios_base::clear(std::_Iosb<int>::_Iostate, bool) in the executable. At run time, the wrong .eh_frame and .gcc_except_table are used to handle exception and then core dump happens.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev