summaryrefslogtreecommitdiff
path: root/include/common
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-07-15 18:55:43 +0100
committerGitHub <noreply@github.com>2016-07-15 18:55:43 +0100
commitaadb1350eed3c18aec6cd999519cef55d93678b3 (patch)
treed851cbd6afa9f9b14676cde93bbf4e49f0cfebf1 /include/common
parent9306f135922bc7811dfc1e24a755c38ce2e671cd (diff)
parent91fad6551ee3e5529f9b442cd4a084251cdebe1d (diff)
Merge pull request #662 from sandrine-bailleux-arm/sb/rodata-xn
Map read-only data as execute-never
Diffstat (limited to 'include/common')
-rw-r--r--include/common/bl_common.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index f13dc316..646a8172 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -137,15 +137,22 @@
#include <cassert.h>
#include <stdint.h>
#include <stddef.h>
-
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#include <utils.h> /* To retain compatibility */
/*
* Declarations of linker defined symbols to help determine memory layout of
* BL images
*/
+#if SEPARATE_CODE_AND_RODATA
+extern unsigned long __TEXT_START__;
+extern unsigned long __TEXT_END__;
+extern unsigned long __RODATA_START__;
+extern unsigned long __RODATA_END__;
+#else
extern unsigned long __RO_START__;
extern unsigned long __RO_END__;
+#endif
+
#if IMAGE_BL2
extern unsigned long __BL2_END__;
#elif IMAGE_BL2U