-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DT_JMPREL error #2
Comments
tested in debian10 gcc (Debian 8.3.0-6) 8.3.0 |
root@Debian10:/tmp/build-junk2-Desktop_Qt_5_12_8_GCC_64bit-Debug# readelf -l ./junk2 Elf file type is DYN (Shared object file) Program Headers: Section to Segment mapping: The above shows the current ELF format |
.rela.plt and .text are in differenct segment now |
594 case DT_JMPREL://.rela.plt The below arithmatic is incorrect, but result is correct. quite funny. should use (target_elf->mmap + (offset of the segment that contains the .rela.plt) + (tmp_dynseg->d_un.d_ptr - (viraddr of the segment that contains the .rela.plt)))
595 target_elf->elfstructs.pltrela = (Elf64_Rela *)(target_elf->mmap + target_code_offset +
596 (tmp_dynseg->d_un.d_ptr - target_code_vaddr));
597 break;
The text was updated successfully, but these errors were encountered: