blob: d879feff0d7b3fe59fba86b096ee47c4b1a5a953 [file] [log] [blame]
David 'Digit' Turner6a9b8882010-06-18 14:47:22 -07001# This function is to be called when the shared library
2# is unloaded through dlclose()
3_on_dlclose:
4 lea __dso_handle, %eax
5 call __cxa_finalize
6 ret
7
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08008/* we put the _init() function here in case the user files for the shared
9 * libs want to drop things into .init section.
10 * We then will call our ctors from crtend_so.o */
11.section .init
12.align 4
13.type _init, @function
14.globl _init
15_init:
16
17.section .init_array, "aw"
18.align 4
19.type __INIT_ARRAY__, @object
20.globl __INIT_ARRAY__
21__INIT_ARRAY__:
22 .long -1
23
24.section .fini_array, "aw"
25.align 4
26.type __FINI_ARRAY__, @object
27.globl __FINI_ARRAY__
28__FINI_ARRAY__:
29 .long -1
David 'Digit' Turner6a9b8882010-06-18 14:47:22 -070030 .long _on_dlclose
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031
32.section .ctors, "aw"
33.align 4
34.type __CTOR_LIST__, @object
35.globl __CTOR_LIST__
36__CTOR_LIST__:
37 .long -1
David 'Digit' Turner6a9b8882010-06-18 14:47:22 -070038
39#include "__dso_handle.S"