Skip to content

Commit

Permalink
tools/scripts/Make.defs: Add -fno-common for loadable ELF
Browse files Browse the repository at this point in the history
Add -fno-common compile option for building loadable ELF to prevent
SHN_COMMON relocations. Fix an issue that may cause loadable ELF to
fail to load.
  • Loading branch information
SPRESENSE committed Jul 19, 2022
1 parent 0cb9a9e commit 9710db4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/tools/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ endif

# ELF module definitions

CELFFLAGS = $(CFLAGS)
CXXELFFLAGS = $(CXXFLAGS)
CELFFLAGS = $(CFLAGS) -fno-common
CXXELFFLAGS = $(CXXFLAGS) -fno-common

LDELFFLAGS = -r -e main
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
Expand Down

0 comments on commit 9710db4

Please sign in to comment.