This introduces crtbegin_so.o and crtend_so.o and also requires a corresponding change in the NDK build scripts to use them. Also add a small test under 'tests/dlclose-destruction' to check that. Note that this is not a sample (i.e. Android application) per se. Change-Id: Icf25836363a3ed59310e579ce990aeca868e70e4
22 lines
426 B
C
22 lines
426 B
C
#ifndef LIBTEST1_H
|
|
#define LIBTEST1_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* define in libtest1, will be called dynamically through dlsym()
|
|
* by main.c. This function receives the address of an integer
|
|
* and sets its value to 1.
|
|
*
|
|
* when the library is unloaded, the value is set to 2 automatically
|
|
* by the destructor there.
|
|
*/
|
|
extern void test1_set(int *px);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* LIBTEST1_H */
|