From patchwork Wed Jun 27 00:13:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 935191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="TKH1QguS"; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Fk0f0MKNz9s0n for ; Wed, 27 Jun 2018 10:13:51 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id B8EA5100E9; Wed, 27 Jun 2018 02:13:46 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.47.9]) by helium.openadk.org (Postfix) with ESMTPS id 1D1B1100E9 for ; Wed, 27 Jun 2018 02:13:45 +0200 (CEST) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id B6F3D24E012D; Tue, 26 Jun 2018 17:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1530058422; bh=CZnh2I9e/5aTjqNpQtqOiSo4kxFy0ioy/EqdwPY3R5k=; h=From:To:CC:Subject:Date:From; b=TKH1QguS7NEr0D60AnfflxpgUw6J3GAPEIB43weDxz0c9JVrlLNx4PvHYMXUqiONS TdZQlVlFNtZVqEza8H/qgnjkkGyddLEsKUyDnP8dD2OzEcVBLk4EbZQjzocqFNZ2yk Ycy76xvxPX9wn7BLCqccJJ7sNww+Aa+xrzFsQ1goRGeljv+1JBCCzNat90Knz94+3G hBF9a4e/6usnoFssnpxlawQriemOhhfil24tYX99Ullhx/INyOtUH7XP9HvmBKy7FR OYkU7Djq2LQr3Z+zC0Lo9ET28cksLHrzQ7M3GYrrqB2i+xhTo8jaF9tQ3ciw7AdVjh v88ATSfs7LU+w== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2-vip.internal.synopsys.com [10.12.239.238]) by mailhost.synopsys.com (Postfix) with ESMTP id 7B60138A3; Tue, 26 Jun 2018 17:13:42 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 26 Jun 2018 17:13:42 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Jun 2018 05:43:38 +0530 Received: from vineetg-Latitude-E7450.internal.synopsys.com (10.9.129.204) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Jun 2018 05:43:37 +0530 From: Vineet Gupta To: Date: Tue, 26 Jun 2018 17:13:31 -0700 Message-ID: <1530058411-720-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.9.129.204] Cc: linux-snps-arc@lists.infradead.org, Vineet Gupta , Alexey.Brodkin@synopsys.com Subject: [uclibc-ng-devel] [PATCH] ldso/arc: fix LD_DEBUG segv when printing R_ARC_NONE X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" Signed-off-by: Vineet Gupta --- ldso/ldso/arc/elfinterp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldso/ldso/arc/elfinterp.c b/ldso/ldso/arc/elfinterp.c index 5a02bc2348da..17d588899dfc 100644 --- a/ldso/ldso/arc/elfinterp.c +++ b/ldso/ldso/arc/elfinterp.c @@ -178,7 +178,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope, log_entry: #if defined __SUPPORT_LD_DEBUG__ - if (_dl_debug_detail) + if (_dl_debug_detail && (reloc_type != R_ARC_NONE)) _dl_dprintf(_dl_debug_file,"\tpatched: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr); #endif @@ -214,7 +214,7 @@ _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope, } #if defined __SUPPORT_LD_DEBUG__ - if (_dl_debug_reloc && _dl_debug_detail) + if (_dl_debug_reloc && _dl_debug_detail && (reloc_type != R_ARC_NONE)) _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", old_val, *reloc_addr, reloc_addr); #endif