mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Fix dynamic linker issue with bind-now
Fix the bind-now case when DT_REL and DT_JMPREL sections are separate and there is a gap between them. [BZ #14341] * elf/dynamic-link.h (elf_machine_lazy_rel): Properly handle the case when there is a gap between DT_REL and DT_JMPREL sections. * sysdeps/x86_64/Makefile (tests): Add tst-split-dynreloc. (LDFLAGS-tst-split-dynreloc): New. (tst-split-dynreloc-ENV): Likewise. * sysdeps/x86_64/tst-split-dynreloc.c: New file. * sysdeps/x86_64/tst-split-dynreloc.lds: Likewise.
This commit is contained in:
@ -135,17 +135,19 @@ elf_machine_lazy_rel (struct link_map *map,
|
||||
\
|
||||
if (ranges[0].start + ranges[0].size == (start + size)) \
|
||||
ranges[0].size -= size; \
|
||||
if (! ELF_DURING_STARTUP && ((do_lazy) || ranges[0].size == 0)) \
|
||||
if (ELF_DURING_STARTUP \
|
||||
|| (!(do_lazy) \
|
||||
&& (ranges[0].start + ranges[0].size) == start)) \
|
||||
{ \
|
||||
/* Combine processing the sections. */ \
|
||||
ranges[0].size += size; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
ranges[1].start = start; \
|
||||
ranges[1].size = size; \
|
||||
ranges[1].lazy = (do_lazy); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
/* Combine processing the sections. */ \
|
||||
ranges[0].size += size; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
if (ELF_DURING_STARTUP) \
|
||||
|
Reference in New Issue
Block a user