From patchwork Fri Mar 31 18:22:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 745771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vvqcN3t2hz9s1y for ; Sat, 1 Apr 2017 05:23:00 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y1tO+bLf"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HbdKxDAmqdSKcBDXMvbpxUG860rF6kz8/RdKCDh8ix8=; b=Y1tO+bLfVIFnS8 h266UABXFkRF0euRz1to6t3QVLBtTvV1gawQSRN4Rw0nJggNNaApwyQ93Yy3YLbSYVOzBGo9i1yPO fnhJA+4gfreVVdtw1cLgxusukwoign7q33EF/3ElBvE5PZr0C6nKpLpU5jSpKyhqvr1WM1G8ZHIP4 w9wFsvNVw5uTHrl+HonvrX+wJHL0zygkEIbJORM4AvWN1pMGp70yrrWirAXlrUlb3skRvEmfuWWhX XoSBSGEx8visSUl6tXba3ObxIUhM7dVettS7ebYLW2MODUbeN3sSrij6cAeP9d3BLq8JltMsevrYv i9KGmJFCL1//P8n+oD8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cu1CN-0002Uv-0T; Fri, 31 Mar 2017 18:22:59 +0000 Received: from smtprelay4.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cu1CJ-0002Ry-OW for linux-snps-arc@lists.infradead.org; Fri, 31 Mar 2017 18:22:57 +0000 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id B6C4C24E0F8F; Fri, 31 Mar 2017 11:22:33 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id B6DB244A; Fri, 31 Mar 2017 11:22:33 -0700 (PDT) Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 876BE42F; Fri, 31 Mar 2017 11:22:33 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 31 Mar 2017 11:22:32 -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.266.1; Fri, 31 Mar 2017 23:52:30 +0530 Received: from vineetg-Latitude-E7450.internal.synopsys.com (10.10.161.82) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 31 Mar 2017 23:52:29 +0530 From: Vineet Gupta To: Subject: [PATCH] ldso: don't discard sysmbols for DODEBUG builds Date: Fri, 31 Mar 2017 11:22:20 -0700 Message-ID: <1490984540-10031-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.10.161.82] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170331_112255_810806_504DFF34 X-CRM114-Status: UNSURE ( 5.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cupertino.Miranda@synopsys.com, Vineet Gupta , linux-snps-arc@lists.infradead.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org the --discard-* toggles take away the symbols which comes in the way when staring at objdumps for debugging low level issues So don't discard symbols for DODEBUG builds before ----- 3388: j_s.d [blink] 338a: add_s sp,sp,0x18 338c: b.d 332c <_dl_add_elf_hash_table+0x50> 3390: mov_s r2,0 3392: nop_s 3394: push_s blink <--- function not called out 3396: st.aw r13,[sp,-20] 339a: std r14r15,[sp,4] 339e: std r16r17,[sp,12] after ----- 3388: j_s.d [blink] 338a: add_s sp,sp,0x18 338c: b.d 332c <_dl_add_elf_hash_table+0x50> 3390: mov_s r2,0 3392: nop_s 00003394 : 3394: push_s blink 3396: st.aw r13,[sp,-20] 339a: std r14r15,[sp,4] 339e: std r16r17,[sp,12] Signed-off-by: Vineet Gupta --- ldso/ldso/Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in index 320e4488ba22..acb1a5b2ac15 100644 --- a/ldso/ldso/Makefile.in +++ b/ldso/ldso/Makefile.in @@ -51,8 +51,11 @@ LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs endif LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start \ -Wl,-z,now -Wl,-Bsymbolic \ - -Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \ - $(CFLAG_-Wl--discard-all) -Wl,--no-undefined + -Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--no-undefined + +ifneq ($(DODEBUG),y) + LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,--discard-locals $(CFLAG_-Wl--discard-all) +endif LDFLAGS-$(LDSO_PRELINK_SUPPORT)-$(UCLIBC_LDSO_NAME).so += -Wl,-defsym=$(SYMBOL_PREFIX)_begin=0