In short, you need to compile your library with one of the -fpic or -fpic , where PIC is the abbreviation for Independent Code Position .
The longer answer is that your yourlib.so file was compiled in a way that does not comply with the Google Android standard for the ELF file, where this Dynamic Array Tag entry is unexpected. At best, the library will still work, but it is still a bug, and a future version of AOS will probably prevent it from starting.
DT_TEXTREL 0x16 (22)
To verify that your library uses something line by line:
# readelf --wide -S yourlib.so There are 37 section headers, starting at offset 0x40: Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 0000000000000000 002400 068f80 00 AX 0 0 16 [ 2] .rodata PROGBITS 0000000000000000 06b380 05ad00 00 WA 0 0 32 ... [16] .rela.text RELA 0000000000000000 26b8e8 023040 18 14 1 8 ... [36] .rela.debug_frame RELA 0000000000000000 25a608 0112e0 18 14 27 8 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), l (large) I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)
Please see my extensive answer on this topic for more details on the DT entry . More on how to write the right dynamic libraries is a must-read .
not2qubit Mar 29 '17 at 17:05 2017-03-29 17:05
source share