summaryrefslogtreecommitdiffstats
path: root/arch/arc/lib/sections.c
diff options
context:
space:
mode:
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>2014-02-04 12:56:15 +0400
committerTom Rini <trini@ti.com>2014-02-07 08:14:32 -0500
commit2272382879d93d37e7964554cea5b0583c94c247 (patch)
treea17d27c3e4fcaaa9d192cbc0a9d5a2bc7cec8da9 /arch/arc/lib/sections.c
parent2f16ac9df4d898ab7266f768f125a638c7c5add8 (diff)
downloadblackbird-obmc-uboot-2272382879d93d37e7964554cea5b0583c94c247.tar.gz
blackbird-obmc-uboot-2272382879d93d37e7964554cea5b0583c94c247.zip
arc: add library functions
These are library functions used by ARC700 architecture. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Francois Bedard <fbedard@synopsys.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/arc/lib/sections.c')
-rw-r--r--arch/arc/lib/sections.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arc/lib/sections.c b/arch/arc/lib/sections.c
new file mode 100644
index 0000000000..b0b46a4e9a
--- /dev/null
+++ b/arch/arc/lib/sections.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/*
+ * For some reason linker sets linker-generated symbols to zero in PIE mode.
+ * A work-around is substitution of linker-generated symbols with
+ * compiler-generated symbols which are properly handled by linker in PAE mode.
+ */
+
+char __bss_start[0] __attribute__((section(".__bss_start")));
+char __bss_end[0] __attribute__((section(".__bss_end")));
+char __image_copy_start[0] __attribute__((section(".__image_copy_start")));
+char __image_copy_end[0] __attribute__((section(".__image_copy_end")));
+char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start")));
+char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end")));
+char __text_start[0] __attribute__((section(".__text_start")));
+char __text_end[0] __attribute__((section(".__text_end")));
+char __init_end[0] __attribute__((section(".__init_end")));
OpenPOWER on IntegriCloud