You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/03/22 14:47:07 UTC
[incubator-nuttx-apps] branch master updated: Strip the debug
information if CONFIG_DEBUG_SYMBOLS isn't enable.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new d614ee8 Strip the debug information if CONFIG_DEBUG_SYMBOLS isn't enable.
d614ee8 is described below
commit d614ee8efa697626ccc007ea91e69f536e0a3c71
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Mar 22 09:46:58 2020 -0500
Strip the debug information if CONFIG_DEBUG_SYMBOLS isn't enable.
---
Application.mk | 5 +++--
examples/elf/Kconfig | 11 -----------
examples/elf/tests/Makefile | 4 +---
examples/module/Kconfig | 11 -----------
examples/module/drivers/Makefile | 4 +---
5 files changed, 5 insertions(+), 30 deletions(-)
diff --git a/Application.mk b/Application.mk
index 641e89b..9379206 100644
--- a/Application.mk
+++ b/Application.mk
@@ -112,8 +112,6 @@ endef
define ELFLD
@echo "LD: $2"
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) $(ARCHCRT0OBJ) $1 $(LDLIBS) -o $2
-# $(Q) $(STRIP) $2
- $(Q) chmod +x $2
endef
$(AOBJS): %$(SUFFIX)$(OBJEXT): %.S
@@ -158,6 +156,9 @@ ifeq ($(WINTOOL),y)
else
$(call ELFLD,$(firstword $(PROGOBJ)),$(firstword $(PROGLIST)))
endif
+ifneq ($(CONFIG_DEBUG_SYMBOLS),y)
+ $(Q) $(STRIP) $(firstword $(PROGLIST))
+endif
$(eval PROGLIST=$(filter-out $(firstword $(PROGLIST)),$(PROGLIST)))
$(eval PROGOBJ=$(filter-out $(firstword $(PROGOBJ)),$(PROGOBJ)))
diff --git a/examples/elf/Kconfig b/examples/elf/Kconfig
index f07ca75..1dd4246 100644
--- a/examples/elf/Kconfig
+++ b/examples/elf/Kconfig
@@ -94,17 +94,6 @@ config EXAMPLES_ELF_DEVPATH
file system containing the ELF executables to be tested. Default:
"/dev/ram0" for ROMFS, "/dev/mmcsd0" for the external file system.
-config EXAMPLES_ELF_NOSTRIP
- bool "Do not strip debug symbols"
- default n
- depends on DEBUG_SYMBOLS
- ---help---
- By default, if debug symbols are enabled (via CONFIG_DEBUG_SYMBOLS), then the
- ELF executables will also retain debug symbols in the resulting ELF binaries.
- Select this option if you do not want that behavior, this option will permit
- debug symbols in the base code but will strip debug symbols out of the ELF
- binaries for a smaller ROM file system image.
-
config EXAMPLES_ELF_SYSCALL
bool "Link with SYSCALL library"
default n
diff --git a/examples/elf/tests/Makefile b/examples/elf/tests/Makefile
index 984bc2d..4c062e2 100644
--- a/examples/elf/tests/Makefile
+++ b/examples/elf/tests/Makefile
@@ -94,11 +94,9 @@ build: $(foreach DIR, $(BUILD_SUBDIRS), $(DIR)_build)
# Install each program in the file system image directory
install: $(foreach DIR, $(BUILD_SUBDIRS), $(DIR)_install)
-ifneq ($(STRIP),)
-ifneq ($(CONFIG_EXAMPLES_ELF_NOSTRIP),y)
+ifneq ($(CONFIG_DEBUG_SYMBOLS),y)
$(Q) $(STRIP) $(wildcard $(FSIMG_SUBDIR)/*)
endif
-endif
# Create the file system image directory
diff --git a/examples/module/Kconfig b/examples/module/Kconfig
index 864a809..f58c389 100644
--- a/examples/module/Kconfig
+++ b/examples/module/Kconfig
@@ -114,17 +114,6 @@ config EXAMPLES_MODULE_BINDIR
The full, absolute path to the location for the binaries can be
located in a pre-mounted external file system.
-config EXAMPLES_MODULE_NOSTRIP
- bool "Do not strip debug symbols"
- default n
- depends on DEBUG_SYMBOLS
- ---help---
- By default, if debug symbols are enabled (via CONFIG_DEBUG_SYMBOLS), then the
- ELF executables will also retain debug symbols in the resulting ELF binaries.
- Select this option if you do not want that behavior, this option will permit
- debug symbols in the base code but will strip debug symbols out of the ELF
- binaries for a smaller ROM file system image.
-
config EXAMPLES_MODULE_LIBC
bool "Link with LIBC"
default n
diff --git a/examples/module/drivers/Makefile b/examples/module/drivers/Makefile
index a336ceb..9d054b7 100644
--- a/examples/module/drivers/Makefile
+++ b/examples/module/drivers/Makefile
@@ -76,11 +76,9 @@ build: $(foreach DIR, $(BUILD_SUBDIRS), $(DIR)_build)
# Install each program in the fsroot directory
install: $(foreach DIR, $(BUILD_SUBDIRS), $(DIR)_install)
-ifneq ($(STRIP),)
-ifneq ($(CONFIG_EXAMPLES_MODULE_NOSTRIP),y)
+ifneq ($(CONFIG_DEBUG_SYMBOLS),y)
$(Q) $(STRIP) $(wildcard $(FSIMG_SUBDIR)$(DELIM)*)
endif
-endif
# Create the fsroot directory