Generate BTI GNU note for TS assembly files

Add GNU note after compiling assembly files to
avoid having warning.

Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: I9c293826ec0d0a3ad7df5d19eab80e1d0d8069ae
diff --git a/environments/opteesp/default_toolchain_file.cmake b/environments/opteesp/default_toolchain_file.cmake
index 00ddf89..613cd43 100644
--- a/environments/opteesp/default_toolchain_file.cmake
+++ b/environments/opteesp/default_toolchain_file.cmake
@@ -34,6 +34,7 @@
 	# flag, and to turn on the BTI flag in the output anyway.
 	set(TS_MANDATORY_AARCH_FLAGS "${TS_MANDATORY_AARCH_FLAGS} -mbranch-protection=bti")
 	set(TS_MANDATORY_LINKER_FLAGS "${TS_MANDATORY_LINKER_FLAGS} -zforce-bti")
+	add_compile_definitions("BTI_ENABLED")
 elseif(BTI_ENABLED STREQUAL "OFF")
 	set(TS_MANDATORY_AARCH_FLAGS "${TS_MANDATORY_AARCH_FLAGS} -mbranch-protection=none")
 endif()
diff --git a/environments/sp/default_toolchain_file.cmake b/environments/sp/default_toolchain_file.cmake
index b2c4bb1..f0945f1 100644
--- a/environments/sp/default_toolchain_file.cmake
+++ b/environments/sp/default_toolchain_file.cmake
@@ -33,6 +33,7 @@
 	# flag, and to turn on the BTI flag in the output anyway.
 	set(TS_MANDATORY_AARCH_FLAGS "${TS_MANDATORY_AARCH_FLAGS} -mbranch-protection=bti")
 	set(TS_MANDATORY_LINKER_FLAGS "${TS_MANDATORY_LINKER_FLAGS} -zforce-bti")
+	add_compile_definitions("BTI_ENABLED")
 elseif(BTI_ENABLED STREQUAL "OFF")
 	set(TS_MANDATORY_AARCH_FLAGS "${TS_MANDATORY_AARCH_FLAGS} -mbranch-protection=none")
 endif()
diff --git a/environments/sp/entry.S b/environments/sp/entry.S
index 29c61c3..ab6c0af 100644
--- a/environments/sp/entry.S
+++ b/environments/sp/entry.S
@@ -83,3 +83,5 @@
 	.asciz "Only R_AARCH64_RELATIVE type relocation is supported"
 	.align 8
 END_FUNC __sp_entry
+
+BTI(emit_aarch64_feature_1_and     GNU_PROPERTY_AARCH64_FEATURE_1_BTI)