输出这个东西:
03-09 14:38:46.291 2372-2389/? W/linker: libxxa++.so: unused DT entry: type 0x6ffffffe arg 0x7ca4
libxxa++.so: unused DT entry: type 0x6fffffff arg 0x2
下边解释: 有些理解不了。以后再补充。
20191106:补充解释:DT表是DYNAMIC SEGMENT 的内容,这个报错,意味着DT表解析失败,很大程度就是SO编译的eabi不对,所以注意检查编译的架构类型就可以;
What are "unused DT entry" errors?
If you have reached this page, it's probably because you have compiled or attempted to run some binaries on your ARM based Android system, with the result that your binary/app crashes or generates a lot of warnings in your logcat
. Typically something like this:
WARNING: linker: /blahblah/libopenssl.so: unused DT entry: type 0x6ffffffe arg 0x1188
Q: What is a "DT entry"?
In a few words, they are descriptive array entries in the file structure of an ELF file. Specifically they are known as Dynamic Array Tags
and are requirements for executable and shared objects. However, not all entries are required or available, depending on the processor and kernel architecture.
In our case we are faced with a "Warning" that one of these are "unused". What that means is, that your executable or library (*.so
) files has been compiled with the DT entry indicated, but your kernel is not supporting that entry, for various reasons. The best examples are found on ARM based Android systems, where the system library paths are fixed and the cross compilers used for your firmware (OS/kernel) are set not to use these entries. Usually the binaries still run just fine, but the kernel is flagging this warning every time you're using it.
Q: When does this happen?
This can happen when:
- Your ARM kernel is cross-compiled using the wrong flags (usually meant for other processor architectures).
- Your ARM binaries and libraries are cross-compiled using AOS deprecated compilation flags.
- and probably other ways yet to be discovered..
Starting from 5.1 (API 22) the Android linker warns about the VERNEED and VERNEEDNUM ELF dynamic sections.
The most common flags that cause this error on Android devices are:
DT_RPATH 0x0f (15) The DT_STRTAB string table offset of a null-terminated library search path string.
This element's use has been superseded by DT_RUNPATH.
DT_RUNPATH 0x1d (29) The DT_STRTAB string table offset of a null-terminated library search path string.
DT_VERNEED 0x6ffffffe The address of the version dependency table. Elements within this table contain
indexes into the string table DT_STRTAB. This element requires that the
DT_VERNEEDNUM element also be present.
DT_VERNEEDNUM 0x6fffffff The number of entries in the DT_VERNEEDNUM table.