diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 5f1f8008073648a30643f66e6690e4a76577e63b..c2dd514d9391cc9d65a3b74a679b54bdc1375569 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -82,6 +82,11 @@ CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS)) CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS)) endif +# We don't want gcc reordering functions if possible. This ensures that an +# application's entry point will be the first function in the application's +# source file. +CFLAGS += $(call cc-option,-fno-toplevel-reorder) + all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF) #########################################################################