[lib][trusty] Use EXTRA_LINKER_SCRIPTS to add trusty app instead of shared_data_sections.ld
Change-Id: I03d4a7cd3cc3ede0af1a556d4ba55f89d54c6df2
diff --git a/lib/trusty/rules.mk b/lib/trusty/rules.mk
index 2001cb5..b625bfe 100644
--- a/lib/trusty/rules.mk
+++ b/lib/trusty/rules.mk
@@ -23,6 +23,8 @@
LOCAL_DIR := $(GET_LOCAL_DIR)
+EXTRA_LINKER_SCRIPTS += $(LOCAL_DIR)/trusty_apps.ld
+
MODULE := $(LOCAL_DIR)
MODULE_SRCS := \
diff --git a/arch/shared_data_sections.ld b/lib/trusty/trusty_apps.ld
similarity index 86%
rename from arch/shared_data_sections.ld
rename to lib/trusty/trusty_apps.ld
index 92d5b83..247a232 100644
--- a/arch/shared_data_sections.ld
+++ b/lib/trusty/trusty_apps.ld
@@ -22,22 +22,14 @@
*/
/* should be included in all lk linker scripts in the .data segment */
-. = ALIGN(4);
-__commands_start = .;
-KEEP (*(.commands))
-__commands_end = .;
-. = ALIGN(4);
-__apps_start = .;
-KEEP (*(.apps))
-__apps_end = .;
-. = ALIGN(4);
-__devices = .;
-KEEP(*(.devices))
-__devices_end = .;
-
+SECTIONS {
+.__trusty_app : {
/* pre-built secure apps get inserted here */
. = ALIGN(0x1000);
__trusty_app_start = .;
KEEP(*(.task.*))
__trusty_app_end = .;
. = ALIGN(0x1000);
+}
+}
+INSERT AFTER .data;