Skip to content

Commit

Permalink
Update patch set 4
Browse files Browse the repository at this point in the history
Patch Set 4:

> Patch Set 4:
> 
> > Patch Set 4:
> > 
> > I want to reduce DSO proliferation on the system. Why do we need a libunwind.so instead of just exporting the unwinder from libc?
> 
> I think we could export the unwinder from libc, although this would mean that the unwinder symbols would be exposed to the NDK (we'd be adding them to LIBC_PRIVATE so they wouldn't appear in the NDK stubs but could still be used at runtime for symbol resolution). I think this is unlikely to cause problems but I'd like to get opinions from Bionic folks as well.

Adding LIBC_PRIVATE to the libc.so symbols doesn't help much unless the relocations from an NDK app use a non-empty version string that isn't LIBC_PRIVATE. If the relocation has no version string, then it will match a non-hidden LIBC_PRIVATE symbol.

It doesn't seem that difficult to have relocations to the unwinder without a version string. (It's currently happening with the libc++_shared.so in NDK r21 beta2 -- android/ndk#1166.) By default, the bfd/gold/lld linkers allow relocations to unresolved symbols in DSOs, though it is common to change this default using --no-undefined, -Z,defs, etc.

Patch-set: 4
Reviewer: Gerrit User 1229339 <1229339@85c56323-6fa9-3386-8a01-6480fb634889>
  • Loading branch information
Gerrit User 1229339 authored and Gerrit Code Review committed Jan 8, 2020
1 parent 59215c3 commit 523b7cc
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 523b7cc

Please sign in to comment.