@@ -108,7 +108,7 @@ symbols will not be made available to libraries loaded by later calls
108
108
to dlopen(3) (as opposed to being referenced by DT_NEEDED entries).
109
109
110
110
111
- ## GNU hashes (Availible in API level >= 23)
111
+ ## GNU hashes (Available in API level >= 23)
112
112
113
113
The GNU hash style available with ` --hash-style=gnu ` allows faster
114
114
symbol lookup and is supported by Android's dynamic linker in API level 23 and
@@ -437,6 +437,8 @@ app-specific one. For example, to enable logging of all dlopen(3)
437
437
adb shell setprop debug.ld.all dlerror,dlopen
438
438
```
439
439
440
+ See also ` LD_DEBUG ` .
441
+
440
442
441
443
## dlclose interacts badly with thread local variables with non-trivial destructors
442
444
@@ -544,3 +546,20 @@ This was especially confusing (and hard to debug) because the restriction did
544
546
_ not_ apply if your app was debuggable. To be compatible with all API levels,
545
547
always give files that need to be extracted a "lib" prefix and ".so" suffix,
546
548
or avoid using ` extractNativeLibs ` .
549
+
550
+
551
+ ## The LD_DEBUG environment variable.
552
+
553
+ On devices running API level 37 or later you can also use the ` LD_DEBUG `
554
+ environment variable when running a stand-alone executable such as a unit test.
555
+ The syntax is broadly similar to glibc, and you can get help for the specific
556
+ version of Android you're on by using ` LD_DEBUG=help ` .
557
+ You can also enable everything by using ` LD_DEBUG=all ` .
558
+
559
+ (Older versions of Android also supported ` LD_DEBUG ` ,
560
+ but used integers instead of strings.
561
+ The meaning of those integers varied by release,
562
+ and some releases compiled support for ` LD_DEBUG ` out of released builds,
563
+ so the best advice is either "look at the corresponding source" or
564
+ "start with ` 1 ` and keep increasing the number until you see what you want,
565
+ or see no change in output from the previous value".)
0 commit comments