This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Dynamic linker issue with bind now?
- From: Petar Jovanovic <petar dot jovanovic at rt-rk dot com>
- To: libc-alpha at sourceware dot org
- Cc: petar dot jovanovic at imgtec dot com, davem at davemloft dot net, Petar Jovanovic <petar dot jovanovic at rt-rk dot com>
- Date: Wed, 20 Aug 2014 02:10:05 +0200
- Subject: Dynamic linker issue with bind now?
- Authentication-results: sourceware.org; auth=none
Hello everyone,
Is it possible that someone familiar enough with elf/dynamic-link.h
takes a look at _ELF_DYNAMIC_DO_RELOC macro?
I am under impression that the macro does not correctly handle a case
when DT_REL* and DT_JMPREL are completely separated and there is a gap
between them.
Previously, David S. Miller's patch [1] aimed to fix that case.
Ergo, the code will work in the lazy-bound case, but not in the
bind-now case, and DT_JMPREL section will not be processed. In a
particular case that I have come across, this caused a crash in
_PROCEDURE_LINKAGE_TABLE_, since plt entry for libc_start_main function
did not get updated.
If my assumptions are correct, I would propose a patch that will resolve
the case. Otherwise, I would appreciate explanation how that case gets
resolved correctly.
Thank you.
Regards,
Petar
[1] ld.so regression patch,
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d7dd44133f53e8bcc81e18c11694bee985cd86d0
Petar Jovanovic (1):
Fix dynamic linker issue with bind-now
elf/dynamic-link.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
1.7.9.5