Commit 620bbba5 authored by Peter Tyser's avatar Peter Tyser Committed by Wolfgang Denk

examples/standalone: Remove relocation compile flags for PowerPC

Previously, standalone applications were compiled with gcc flags that
produced relocatable executables on the PowerPC architecture (eg with
the -mrelocatable and -fPIC flags).  There's no reason for these
applications to be fully relocatable at this time since no relocation
fixups are performed on standalone applications.

Additionally, removing the gcc relocation flags results in the entry
point of applications residing at the base of the image.  When
a standalone application was relocatable, the entry point was generally
located at an offset into the image which was confusing and prone to
errors.

This change moves the entry point of PowerPC standalone applications
from 0x40004 (usually) to 0x40000.
Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent 3bf74a41
......@@ -72,6 +72,16 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
CPPFLAGS += -I..
# For PowerPC there's no need to compile standalone applications as a
# relocatable executable. The relocation data is not needed, and
# also causes the entry point of the standalone application to be
# inconsistent.
ifeq ($(ARCH),powerpc)
AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS))
CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS))
CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS))
endif
all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
#########################################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment