From patchwork Wed Sep 10 14:43:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petar Jovanovic X-Patchwork-Id: 2753 Received: (qmail 8992 invoked by alias); 10 Sep 2014 14:44:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 8982 invoked by uid 89); 10 Sep 2014 14:44:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail.rt-rk.com From: "Petar Jovanovic" To: Cc: , References: <1408493406-86741-1-git-send-email-petar.jovanovic@rt-rk.com> <1408493406-86741-2-git-send-email-petar.jovanovic@rt-rk.com> In-Reply-To: <1408493406-86741-2-git-send-email-petar.jovanovic@rt-rk.com> Subject: RE: [PATCH] Fix dynamic linker issue with bind-now Date: Wed, 10 Sep 2014 16:43:51 +0200 Message-ID: <000701cfcd05$a39a4240$eacec6c0$@rt-rk.com> MIME-Version: 1.0 ping -----Original Message----- From: Petar Jovanovic [mailto:petar.jovanovic@rt-rk.com] Sent: Wednesday, August 20, 2014 2:10 AM To: libc-alpha@sourceware.org Cc: petar.jovanovic@imgtec.com; davem@davemloft.net; Petar Jovanovic Subject: [PATCH] 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. --- elf/dynamic-link.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) + && ((do_lazy) || ranges[0].size == 0 || \ + ranges[0].start + ranges[0].size != start)) \ { \ ranges[1].start = start; \ ranges[1].size = size; \ diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index 7b3e295..d5dea8e 100644 --- a/elf/dynamic-link.h +++ b/elf/dynamic-link.h @@ -133,7 +133,9 @@ 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 \