mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-13 20:17:09 +00:00
2bbe75a08a
This is from the problem report at https://sourceware.org/bugzilla/show_bug.cgi?id=19707. GCC 5.3.1, when invoked with -g -O2 emits some debug info where some virtual member functions with linkage name have no reference to any underlying symbol. When that binary is compared to its counterpart compiled with -g, the member function in question does have an underlying symbol and thus the comparison of the enclosing types yield a spurious change report like: method virtual void unity::scopes::ScopeBase::stop() didn't have any linkage name, and it now has: '_ZN5unity6scopes9ScopeBase4stopEv' This patch introduces a pass in the DWARF reader which fixes up virtual member function with linkage and no underlying symbol. If there is a symbol with a name equals to the linkage name, the virtual member function has its underlying symbol set to that symbol. This fixes the spurious change report. * src/abg-dwarf-reader.cc (die_function_decl_map_type): New typedef. (read_context::die_function_with_no_symbol_map_): New data member. (read_context::die_function_decl_with_no_symbol_map): New accessor. (read_context::fixup_functions_with_no_symbols): New member function. (finish_member_function_reading): Take a read_context. Schedule virtual member functions with linkage and no underlying symbol to be fixed up after all the debug info is read. (build_function_decl): After a virtual member function_decl has been updated, if it has its underlying symbol and was scheduled for fixup, then de-schedule it. (build_class_type_and_add_to_ir, build_ir_node_from_die): Adjust call to finish_member_function_reading. (read_corpus_from_elf): Move the pure ELF (symbol and other mundane information) information reading ... (read_debug_info_into_corpus): ... here. Make it happen *before* actual reading of DWARF information. We need symbol information to be present and fully set before we start reading debug info. This is so that we can know when a virtual member function doesn't need to be fixed up. Also, perform the fixup after the debug information was read. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
test0 | ||
test0.abi | ||
test0.cc | ||
test1 | ||
test1.abi | ||
test1.cc | ||
test2-0.cc | ||
test2-1.cc | ||
test2.h | ||
test2.so | ||
test2.so.abi | ||
test3.c | ||
test3.so | ||
test3.so.abi | ||
test4.c | ||
test4.so | ||
test4.so.abi | ||
test5.cc | ||
test5.o | ||
test5.o.abi | ||
test6.cc | ||
test6.so | ||
test6.so.abi | ||
test7.cc | ||
test7.so | ||
test7.so.abi | ||
test8-qualified-this-pointer.cc | ||
test8-qualified-this-pointer.so | ||
test8-qualified-this-pointer.so.abi | ||
test9-pr18818-clang.so | ||
test9-pr18818-clang.so.abi | ||
test10-pr18818-gcc.so | ||
test10-pr18818-gcc.so.abi | ||
test11-pr18828.so | ||
test11-pr18828.so.abi | ||
test12-pr18844.so | ||
test12-pr18844.so.abi | ||
test13-pr18894.so | ||
test13-pr18894.so.abi | ||
test14-pr18893.so | ||
test14-pr18893.so.abi | ||
test15-pr18892.so | ||
test15-pr18892.so.abi | ||
test16-pr18904.so | ||
test16-pr18904.so.abi | ||
test17-pr19027.so | ||
test17-pr19027.so.abi | ||
test18-pr19037-libvtkRenderingLIC-6.1.so | ||
test18-pr19037-libvtkRenderingLIC-6.1.so.abi | ||
test19-pr19023-libtcmalloc_and_profiler.so | ||
test19-pr19023-libtcmalloc_and_profiler.so.abi | ||
test20-pr19025-libvtkParallelCore-6.1.so | ||
test20-pr19025-libvtkParallelCore-6.1.so.abi | ||
test21-pr19092.so | ||
test21-pr19092.so.abi | ||
test22-pr19097-libstdc++.so.6.0.17.so | ||
test22-pr19097-libstdc++.so.6.0.17.so.abi |