[PATCH] D86254: [libunwind] Minor fixes in libunwind
Ryan Prichard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 15:55:23 PDT 2020
rprichard added a comment.
There is a `libunwind::findUnwindSectionsByPhdr` as of 11.x. When I build 11.x libunwind.so for glibc (I tested arm and x86_64), the symbol is exposed:
$ readelf --dyn-syms unwind-arm/lib/libunwind.so.1.0 | grep findUnwind
35: 00000f24 204 FUNC GLOBAL DEFAULT 11 _ZN9libunwind24findUnwindSectionsByPhdrEP12dl_phdr_infojPv
$ readelf --dyn-syms unwind-x86_64/lib/libunwind.so.1.0 | grep findUnwind
46: 0000000000002c30 854 FUNC GLOBAL DEFAULT 12 _ZN9libunwind24findUnwindSectionsByPhdrEP12dl_phdr_infomPv
In previous releases, the function was a lambda instead, and the lambda was a hidden symbol (because `LocalAddressSpace` is marked with `_LIBUNWIND_HIDDEN`, which is `__attribute__((visibility("hidden")))`.)
$ readelf -s unwind-arm/src/CMakeFiles/unwind_shared.dir/libunwind.cpp.o | grep findUnwind
5: 00000000 0 SECTION LOCAL DEFAULT 23 .text._ZZN9libunwind17LocalAddressSpace18findUnwindSectionsEjRNS_18UnwindInfoSectionsEENUlP12dl_phdr_infojPvE_4_FUNES4_jS5_
7: 00000000 0 SECTION LOCAL DEFAULT 24 .ARM.extab.text._ZZN9libunwind17LocalAddressSpace18findUnwindSectionsEjRNS_18UnwindInfoSectionsEENUlP12dl_phdr_infojPvE_4_FUNES4_jS5_
8: 00000000 0 SECTION LOCAL DEFAULT 25 .ARM.exidx.text._ZZN9libunwind17LocalAddressSpace18findUnwindSectionsEjRNS_18UnwindInfoSectionsEENUlP12dl_phdr_infojPvE_4_FUNES4_jS5_
265: 00000000 204 FUNC WEAK HIDDEN 23 _ZZN9libunwind17LocalAddressSpace18findUnwindSectionsEjRNS_18UnwindInfoSectionsEENUlP12dl_phdr_infojPvE_4_FUNES4_jS5_
$ readelf -s unwind-x86_64/src/CMakeFiles/unwind_shared.dir/libunwind.cpp.o | grep findUnwind
38: 0000000000000000 0 SECTION LOCAL DEFAULT 80 .text._ZZN9libunwind17LocalAddressSpace18findUnwindSectionsEmRNS_18UnwindInfoSectionsEENUlP12dl_phdr_infomPvE_4_FUNES4_mS5_
249: 0000000000000000 313 FUNC WEAK HIDDEN 80 _ZZN9libunwind17LocalAddressSpace18findUnwindSectionsEmRNS_18UnwindInfoSectionsEENUlP12dl_phdr_infomPvE_4_FUNES4_mS5_
The hidden symbol doesn't make it into the shared object's .dynsym table.
11.0.0-final isn't released yet, so maybe this can be fixed still?
I suspect this function is currently only ever defined in libunwind.cpp.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86254/new/
https://reviews.llvm.org/D86254
More information about the llvm-commits
mailing list