mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-05 11:00:15 +00:00
76a55989b1
Finally add fpic compilation option to produce relocatable code. Note that this requires to define CONFIG_NEEDS_MANUAL_RELOC for all board files, also relocation support still has some limitations (e.g. a developer should care not to overwrite the executing code or memset() with zeroes not yet relocated data on malloc init etc.), which may be fixed while switching to PIE. Due to short investigation the architecture code is not ready for PIE linking, this will require some manipulations with .dyn* sections. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
20 lines
419 B
Makefile
20 lines
419 B
Makefile
#
|
|
# (C) Copyright 2000-2002
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
|
|
ifeq ($(CROSS_COMPILE),)
|
|
CROSS_COMPILE := sh4-linux-
|
|
endif
|
|
|
|
CONFIG_STANDALONE_LOAD_ADDR ?= 0x8C000000
|
|
ifeq ($(CPU),sh2)
|
|
CONFIG_STANDALONE_LOAD_ADDR += -EB
|
|
endif
|
|
|
|
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
|
|
PLATFORM_RELFLAGS += -fpic
|
|
LDFLAGS_FINAL = --gc-sections
|
|
PLATFORM_RELFLAGS += -ffixed-r13
|