Skip to content
Snippets Groups Projects
Commit 28c699ef authored by Haavard Skinnemoen's avatar Haavard Skinnemoen
Browse files

AVR32: Build position-independent u-boot


Add -fPIC -mno-init-got to the avr32-specific CFLAGS to make u-boot
position independent. This will make relocation a lot easier.

-mno-init-got means that gcc shouldn't emit code to load the GOT
address into r6 in every function prologue. We do it once and for
all in the early startup assembly code, so enabling this option
makes u-boot a bit faster and smaller.

The assembly parts have always been position-independent, so no code
changes should be necessary.

Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
parent 5374b36d
No related branches found
No related tags found
No related merge requests found
...@@ -21,5 +21,5 @@ ...@@ -21,5 +21,5 @@
# MA 02111-1307 USA # MA 02111-1307 USA
# #
PLATFORM_RELFLAGS += -ffixed-r5 -mno-pic -mrelax PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax
PLATFORM_LDFLAGS += --relax PLATFORM_LDFLAGS += --relax
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment