Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] unwinder symbols are no longer hidden with ndk-build #1092

@DanAlbert

Description

@DanAlbert
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_SRC_FILES := foo.cpp
LOCAL_CPPFLAGS := -fexceptions -frtti
include $(BUILD_SHARED_LIBRARY)
APP_STL := c++_static
void foo() {
    throw 42;
}
$ ndk-build -C foo APP_ABI=arm64-v8a -B V=1
(build output shows -Wl,--exclude-libs,libgcc.a)
$ readelf -sW libs/arm64-v8a/libfoo.so| grep _Unwind
(shows global visibility unwind symbols)

Adding -Wl,--exclude-libs,libgcc_real.a to LOCAL_LDFLAGS fixes this, so this was caused by changing libgcc.a to be a version script (r19, if memory serves).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions