Comment 5 for bug 1305315

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

And where it fails:

bionic/linker/linker.cpp:
1303 static bool soinfo_link_image(soinfo* si) {
...
1360 case DT_JMPREL:
1361 si->plt_rel = (Elf32_Rel*) (base + d->d_un.d_ptr);
...
1543 if (si->plt_rel != NULL) {
1544 DEBUG("[ relocating %s plt ]", si->name );
1545 if (soinfo_relocate(si, si->plt_rel, si->plt_rel_count, needed)) {
1546 return false;
1547 }
1548 }

 848 static int soinfo_relocate(soinfo* si, Elf32_Rel* rel, unsigned count,
 849 soinfo* needed[])
...
 874 s = &symtab[sym];
 875 if (ELF32_ST_BIND(s->st_info) != STB_WEAK) {
 876 DL_ERR("cannot locate symbol \"%s\" referenced by \"%s\"...", sym_name, si->name);
 877 return -1;
 878 }