Skip to content

[BUG] libc++_shared.so exposes libgcc _Unwind_* symbols #1166

Closed
@rprichard

Description

AFAIK, we're trying to hide the libgcc unwinder symbols to avoid the possibility of linking against versions of the symbols from the platform.

I think this is another consequence of the libgcc.a / libgcc_real.a changes.

Maybe https://android-review.googlesource.com/c/platform/ndk/+/1133109 is related?

master

$ for lib in /x/ndk/out/android-ndk-r22-canary/sources/cxx-stl/llvm-libc++/libs/*/libc++_shared.so; do printf '\n%s\n' $lib; readelf --dyn-syms -W $lib | grep ' _Unwind_Resume$'; done

/x/ndk/out/android-ndk-r22-canary/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so
  1930: 00000000000b5e40   252 FUNC    GLOBAL DEFAULT    11 _Unwind_Resume

/x/ndk/out/android-ndk-r22-canary/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so

/x/ndk/out/android-ndk-r22-canary/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so
  1920: 00000000000c0e70   193 FUNC    GLOBAL DEFAULT    13 _Unwind_Resume

/x/ndk/out/android-ndk-r22-canary/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so
  1890: 000b9723   176 FUNC    GLOBAL DEFAULT    13 _Unwind_Resume

r21 branch

$ for lib in /x/ndk-release-r21/out/android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/*/libc++_shared.so; do printf '\n%s\n' $lib; readelf --dyn-syms -W $lib | grep ' _Unwind_Resume$'; done

/x/ndk-release-r21/out/android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so
  1930: 00000000000b5e40   252 FUNC    GLOBAL DEFAULT    11 _Unwind_Resume

/x/ndk-release-r21/out/android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so

/x/ndk-release-r21/out/android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so
  1920: 00000000000c0e70   193 FUNC    GLOBAL DEFAULT    13 _Unwind_Resume

/x/ndk-release-r21/out/android-ndk-r21/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so
  1890: 000b9723   176 FUNC    GLOBAL DEFAULT    13 _Unwind_Resume

r20

$ for lib in /x/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/*/libc++_shared.so; do printf '\n%s\n' $lib; readelf --dyn-syms -W $lib | grep ' _Unwind_Resume$'; done

/x/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so

/x/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so

/x/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so

/x/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions