Skip to content

Commit

Permalink
build/configs, os: fix crash due to misaligned text and flash start
Browse files Browse the repository at this point in the history
force text start to start at the start of flash partition. Also
create map file for common which will be useful for debugging

Signed-off-by: Abhishek Akkabathula <[email protected]>
  • Loading branch information
abhishek-samsung authored and kishore-sn committed Aug 19, 2024
1 parent d4d63dd commit 795f843
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/configs/rtl8730e/scripts/xipelf/userspace_all.ld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SECTIONS
{

.text :
.text ORIGIN(uflash) :
{
_stext_flash = . ;
/* Place holder to keep the heap object at the top
Expand Down
2 changes: 1 addition & 1 deletion os/Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ else
$(Q) $(CC) -c $(CFLAGS) -D__COMMON_BINARY__ $(TOPDIR)/userspace/up_userspace.c -o $(TOPDIR)/userspace/up_userspace_common.o
ifneq ($(CONFIG_XIP_ELF_WARCHIVE), y)
$(Q) $(MAKE) -C $(LOADABLE_APPDIR) TOPDIR="$(TOPDIR)" LOADABLEDIR="${LOADABLE_APPDIR}" LIBRARIES_DIR="$(LIBRARIES_DIR)" USERLIBS="$(USERLIBS)" undefsym KERNEL=n
$(Q) $(LD) -o $(OUTBIN_DIR)/$(CONFIG_COMMON_BINARY_NAME) -T $(OUTBIN_DIR)/common_0.ld -T $(TOPDIR)/../build/configs/$(CONFIG_ARCH_BOARD)/scripts/xipelf/userspace_all.ld $(TOPDIR)/userspace/up_userspace_common.o -L $(LIBRARIES_DIR) --start-group $(USERLIBS) $(LIBGCC) $(LIBSUPXX) --end-group $$(cat $(OUTBIN_DIR)/lib_symbols.txt)
$(Q) $(LD) -o $(OUTBIN_DIR)/$(CONFIG_COMMON_BINARY_NAME) -T $(OUTBIN_DIR)/common_0.ld -T $(TOPDIR)/../build/configs/$(CONFIG_ARCH_BOARD)/scripts/xipelf/userspace_all.ld $(TOPDIR)/userspace/up_userspace_common.o -L $(LIBRARIES_DIR) --start-group $(USERLIBS) $(LIBGCC) $(LIBSUPXX) --end-group $$(cat $(OUTBIN_DIR)/lib_symbols.txt) -Map $(OUTBIN_DIR)/$(CONFIG_COMMON_BINARY_NAME).map
else
$(Q) $(LD) -o $(OUTBIN_DIR)/$(CONFIG_COMMON_BINARY_NAME) -T $(OUTBIN_DIR)/common_0.ld -T $(TOPDIR)/../build/configs/$(CONFIG_ARCH_BOARD)/scripts/xipelf/userspace_all.ld $(TOPDIR)/userspace/up_userspace_common.o -L $(LIBRARIES_DIR) --whole-archive $(USERLIBS) --no-whole-archive --start-group $(LIBGCC) $(LIBSUPXX) --end-group
endif
Expand Down

0 comments on commit 795f843

Please sign in to comment.