summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-03-09 08:46:06 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-03-21 12:23:00 +0100
commit47ea1f6b6df92fdb8dfff8afae1335092383d8fc (patch)
tree7a73ca309a85a8a158b38c6b8224351af888e477 /arch/arm/include
parentf382224173ebf8a7fce42cf09179b5f6bc7dc6c9 (diff)
downloadbarebox-47ea1f6b6df92fdb8dfff8afae1335092383d8fc.tar.gz
barebox-47ea1f6b6df92fdb8dfff8afae1335092383d8fc.tar.xz
ARM: move away from ld_var
The ld_var solves the issue that when compiled with -pie the linker provided variables are all 0x0. This mechanism however refuses to compile with aarch64 support. This patch replaces the ld_var mechanism with a nice little trick learned from U-Boot: Instead of using linker provided variables directly with "__bss_start = ." we put a zero size array into a separate section and use the address of that array instead of the linker variable. This properly works before relocation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/sections.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h
index 8c7bc8cccc..087f63fb60 100644
--- a/arch/arm/include/asm/sections.h
+++ b/arch/arm/include/asm/sections.h
@@ -4,6 +4,11 @@
#ifndef __ASSEMBLY__
#include <asm-generic/sections.h>
+extern char __rel_dyn_start[];
+extern char __rel_dyn_end[];
+extern char __dynsym_start[];
+extern char __dynsym_end[];
+
/*
* Access a linker supplied variable. Use this if your code might not be running
* at the address it is linked at.