From: Vineet.Gupta1@synopsys.com (Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] ldso: don't discard sysmbols for DODEBUG builds
Date: Fri, 31 Mar 2017 11:22:20 -0700 [thread overview]
Message-ID: <1490984540-10031-1-git-send-email-vgupta@synopsys.com> (raw)
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 <add_ldso.isra.9>:
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 <vgupta at synopsys.com>
---
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
--
2.7.4
next reply other threads:[~2017-03-31 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 18:22 Vineet Gupta [this message]
2017-04-03 3:24 ` [uclibc-ng-devel] [PATCH] ldso: don't discard sysmbols for DODEBUG builds Waldemar Brodkorb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490984540-10031-1-git-send-email-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=linux-snps-arc@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).