Project

General

Profile

Actions

Support #1188

closed

Static/dynamic library linking behavior change (10.1 -> 10.2+)

Added by Alex A. over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
build/core
Target version:
Start date:
12/17/2015
Due date:
% Done:

100%

Estimated time:
CPU Architecture:
Host OS:
Toolchain:
Android version:
CrystaX NDK Version:

Description

There was some change in linking behavior, which may or may not be an issue.

I'm attaching a simple project that is able to reproduce the change:

  • test app linked to shared library
  • shared library linked with static library
  • the shared library has a method to access static variable defined in the static library
  • the test app accesses method from shared library and also directly accessing static variable from the static library (the app itself is not linked to static library, at least not explicitly).

Behavior in ndk 10.1.0 (I have also verified that it is behavior in google ndk r10e):

  • calls in the test app refer to the same memory

Behavior in ndk 10.2.0 and 10.3.0:

  • calls refer to different memory locations

Files

ndk-test.tar.xz (18 KB) ndk-test.tar.xz Alex A., 12/17/2015 02:52 AM
Actions

Also available in: Atom PDF