[PATCH] D86372: [libunwind] Make findUnwindSectionsByPhdr static
Ryan Prichard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 14:27:38 PDT 2020
rprichard created this revision.
rprichard added reviewers: compnerd, saugustine, jgorbe, mstorsjo.
Herald added projects: LLVM, libunwind.
Herald added subscribers: libcxx-commits, llvm-commits.
Herald added a reviewer: libunwind.
rprichard requested review of this revision.
Currently, this function is present in the dynsym table of
libunwind.so (on ELF targets). Make the function static so it is
omitted from the dynsym table.
In the previous release (LLVM 10.x), this function was instead a lambda
inside LocalAddressSpace::findUnwindSections, and because
LocalAddressSpace was marked with _LIBUNWIND_HIDDEN, the lambda was
also a hidden symbol.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86372
Files:
libunwind/src/AddressSpace.hpp
Index: libunwind/src/AddressSpace.hpp
===================================================================
--- libunwind/src/AddressSpace.hpp
+++ libunwind/src/AddressSpace.hpp
@@ -432,8 +432,8 @@
return false;
}
-int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t pinfo_size,
- void *data) {
+static int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo,
+ size_t pinfo_size, void *data) {
auto cbdata = static_cast<dl_iterate_cb_data *>(data);
if (pinfo->dlpi_phnum == 0 || cbdata->targetAddr < pinfo->dlpi_addr)
return 0;
@@ -482,7 +482,8 @@
// Given all the #ifdef's above, the code here is for
// defined(LIBUNWIND_ARM_EHABI)
-int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t, void *data) {
+static int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo, size_t,
+ void *data) {
auto *cbdata = static_cast<dl_iterate_cb_data *>(data);
bool found_obj = false;
bool found_hdr = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86372.287108.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200821/6cf9c291/attachment.bin>
More information about the llvm-commits
mailing list