arch/arm/risc-v/xtensa: add support of all symbols for debugging
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
d3a07ca26c
commit
c2fd66bfab
@ -151,11 +151,29 @@ $(KBIN): $(OBJS)
|
||||
board$(DELIM)libboard$(LIBEXT):
|
||||
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
|
||||
|
||||
define LINK_ALLSYMS
|
||||
$(Q) $(TOPDIR)/tools/mkallsyms.sh $(NUTTX) $(CROSSDEV) > allsyms.tmp
|
||||
$(Q) $(call COMPILE, -x c allsyms.tmp, allsyms$(OBJEXT))
|
||||
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
|
||||
-o $(NUTTX) $(filter-out board/libboard$(LIBEXT), $1) allsyms$(OBJEXT) $(EXTRA_OBJS) \
|
||||
$(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
$(Q) $(call DELFILE, allsyms.tmp allsyms$(OBJEXT))
|
||||
endef
|
||||
|
||||
nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT)
|
||||
$(Q) echo "LD: nuttx"
|
||||
ifneq ($(CONFIG_ALLSYMS),y)
|
||||
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
|
||||
-o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \
|
||||
$(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
else
|
||||
$(Q) # Link and generate default table
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
$(Q) # Extract all symbols
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
$(Q) # Extract again since the table offset may changed
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
endif
|
||||
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
$(Q) $(NM) $(NUTTX) | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
|
@ -140,11 +140,29 @@ $(KBIN): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
|
||||
|
||||
define LINK_ALLSYMS
|
||||
$(Q) $(TOPDIR)/tools/mkallsyms.sh $(NUTTX) $(CROSSDEV) > allsyms.tmp
|
||||
$(Q) $(call COMPILE, -x c allsyms.tmp, allsyms$(OBJEXT))
|
||||
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
|
||||
-o $(NUTTX) $(filter-out board/libboard$(LIBEXT), $1) allsyms$(OBJEXT) $(EXTRA_OBJS) \
|
||||
$(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
$(Q) $(call DELFILE, allsyms.tmp allsyms$(OBJEXT))
|
||||
endef
|
||||
|
||||
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
|
||||
$(Q) echo "LD: nuttx"
|
||||
ifneq ($(CONFIG_ALLSYMS),y)
|
||||
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
|
||||
-o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \
|
||||
$(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
else
|
||||
$(Q) # Link and generate default table
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
$(Q) # Extract all symbols
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
$(Q) # Extract again since the table offset may changed
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
endif
|
||||
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
$(Q) $(NM) $(NUTTX) | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
|
@ -105,11 +105,29 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
|
||||
|
||||
define LINK_ALLSYMS
|
||||
$(Q) $(TOPDIR)/tools/mkallsyms.sh $(NUTTX) $(CROSSDEV) > allsyms.tmp
|
||||
$(Q) $(call COMPILE, -x c allsyms.tmp, allsyms$(OBJEXT))
|
||||
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
|
||||
-o $(NUTTX) $(filter-out board/libboard$(LIBEXT), $1) allsyms$(OBJEXT) $(EXTRA_OBJS) \
|
||||
$(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
$(Q) $(call DELFILE, allsyms.tmp allsyms$(OBJEXT))
|
||||
endef
|
||||
|
||||
nuttx$(EXEEXT): $(STARTUP_OBJS) board/libboard$(LIBEXT)
|
||||
@echo "LD: nuttx"
|
||||
ifneq ($(CONFIG_ALLSYMS),y)
|
||||
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
|
||||
-o $(NUTTX) $(STARTUP_OBJS) $(EXTRA_OBJS) \
|
||||
$(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
|
||||
else
|
||||
$(Q) # Link and generate default table
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
$(Q) # Extract all symbols
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
$(Q) # Extract again since the table offset may changed
|
||||
$(Q) $(call LINK_ALLSYMS, $^)
|
||||
endif
|
||||
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
$(Q) $(NM) $(NUTTX) | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
|
Loading…
Reference in New Issue
Block a user