OSDN Git Service

Count references for groups instead of instances
authorDmitriy Ivanov <dimitry@google.com>
Sat, 29 Nov 2014 21:57:41 +0000 (13:57 -0800)
committerDmitriy Ivanov <dimitry@google.com>
Tue, 2 Dec 2014 18:54:26 +0000 (10:54 -0800)
commitab972b9adf8789a9e1b03129cd7f0c22e6bba117
tree33b816d65afbcd622e38730b7516ba59ddb48fac
parentf64c43ba6c9244c50e904961dc432f04b1dfcfd9
Count references for groups instead of instances

  Count references on the group level to avoid
  partially unloading function that might be
  referenced by other libraries in the local_group

  Bonus: with this change we can correctly unload recursively
  linked libraries. is_recursive check is removed.

  Also dynamic executables (not .so) with 0 DT_NEEDED libraries
  are now correctly linked.

Change-Id: Idfa83baef402840599b93a875f2881d9f020dbcd
13 files changed:
linker/dlfcn.cpp
linker/linked_list.h
linker/linker.cpp
linker/linker.h
tests/dlfcn_test.cpp
tests/libs/Android.build.dlopen_2_parents_reloc.mk [new file with mode: 0644]
tests/libs/Android.mk
tests/libs/dlopen_2_parents_reloc_answer.cpp [new file with mode: 0644]
tests/libs/dlopen_testlib_loopy_a.cpp [new file with mode: 0644]
tests/libs/dlopen_testlib_loopy_b.cpp [new file with mode: 0644]
tests/libs/dlopen_testlib_loopy_c.cpp [new file with mode: 0644]
tests/libs/dlopen_testlib_loopy_invalid.cpp [moved from tests/libs/dlopen_testlib_invalid.cpp with 72% similarity]
tests/libs/dlopen_testlib_loopy_root.cpp [new file with mode: 0644]