I recently read some elf files from Android and summarized some points. Some of them may not be accurate, just a personal summary.
Differences between Elf files in Android and elf files in Linux:
1. in Linux, symbol-related tables include dynamic link symbol tables, symbol tables, and relocation tables.
In Android, there is only one string table (. dynstr) and one symbol table (. dynsym ).
2. in Linux, The. Got table and. Got. PLT table are separated.
In Android, only one. Got table exists.
3. In Android, the rel. PLT function is relocated. The type is r_arm_jump_slot, And the rel. Dyn parameter is relocated. The type isR_arm_glob_dat.
4. Android runs after loading the dynamic shared library (. So file)ProgramThe previous relocation has been completed, and there is no PLT process.
The PLT process is available in Linux.
5. Obtain the handle of the global symbol table: dlopen (filename, flag). When filename = 0, the function returns the handle of the global symbol table.