This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Drop -Wl,-z,defs for SHARED builds.
AbandonedPublic

Authored by plotfi on Nov 6 2019, 9:13 AM.

Details

Summary

Drop -Wl,-z,defs in shared builds of libunwind since during builds of ELF libraries, symbol resolution is incomplete.

Diff Detail

Event Timeline

plotfi created this revision.Nov 6 2019, 9:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2019, 9:13 AM

Can you please write a more complete commit message explaining the need for this.

As an aside for the review itself, could you please enumerate what symbols are unresolved and why they are unresolved.

plotfi added a comment.Nov 6 2019, 9:18 AM

Can you please write a more complete commit message explaining the need for this.

As an aside for the review itself, could you please enumerate what symbols are unresolved and why they are unresolved.

Sure.

The symbols/errors are:

the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

>>> referenced by libunwind.cpp: libunwind/src/CMakeFiles/unwind_shared.dir/libunwind.cpp.o:(typeinfo for libunwind::AbstractUnwindCursor)
ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info
>>> referenced by libunwind.cpp: libunwind/src/CMakeFiles/unwind_shared.dir/libunwind.cpp.o:(typeinfo for libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_arm>)
plotfi abandoned this revision.Nov 6 2019, 10:44 AM

Abandoning: We are going to try building libunwind without rtti.