diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2023-08-27 00:25:36 +0200 |
---|---|---|
committer | Angelo Dureghello <angelo@kernel-space.org> | 2023-09-06 13:28:58 +0200 |
commit | 26af162ac8f8ab3222d32f00f06a4774a061150a (patch) | |
tree | a15efb3f50ae8be1a3d46f70f772c32ec4ad298f /arch/m68k/config.mk | |
parent | bf10b9201c1ed198f76bc0a35fc64951de7583bc (diff) | |
download | u-boot-26af162ac8f8ab3222d32f00f06a4774a061150a.tar.gz |
arch: m68k: Implement relocation
Implement relocation for M68K. Perform all the updates in start.S
relocate_code in assemby, since it is a simple matter of traversing
the dynsym table and adding relocation offset - MONITOR_BASE to all
the items in that table. The necessity to deal with MONITOR_BASE is
a specific of M68K, where the ELF entry point is at offset 0x400,
which is the MONITOR_BASE, while TEXT_BASE is at offset 0 .
This also removes the one last user of NEEDS_MANUAL_RELOC, so that
could be finally cleaned up .
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'arch/m68k/config.mk')
-rw-r--r-- | arch/m68k/config.mk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk index 3ccbe492202..643b7d1d35d 100644 --- a/arch/m68k/config.mk +++ b/arch/m68k/config.mk @@ -3,8 +3,8 @@ # (C) Copyright 2000-2002 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -PLATFORM_CPPFLAGS += -D__M68K__ -KBUILD_LDFLAGS += -n +PLATFORM_CPPFLAGS += -D__M68K__ -fPIC +KBUILD_LDFLAGS += -n -pie PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -LDFLAGS_FINAL += --gc-sections +LDFLAGS_FINAL += --gc-sections -pie |