David 'Digit' Turner | 6a9b888 | 2010-06-18 14:47:22 -0700 | [diff] [blame^] | 1 | # 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 Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 8 | /* 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' Turner | 6a9b888 | 2010-06-18 14:47:22 -0700 | [diff] [blame^] | 30 | .long _on_dlclose |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 31 | |
| 32 | .section .ctors, "aw" |
| 33 | .align 4 |
| 34 | .type __CTOR_LIST__, @object |
| 35 | .globl __CTOR_LIST__ |
| 36 | __CTOR_LIST__: |
| 37 | .long -1 |
David 'Digit' Turner | 6a9b888 | 2010-06-18 14:47:22 -0700 | [diff] [blame^] | 38 | |
| 39 | #include "__dso_handle.S" |