From d70196ba875eb0d33a8a1937787190e9ce21a76c Mon Sep 17 00:00:00 2001 From: Adithya Baglody Date: Wed, 4 Apr 2018 17:20:09 +0530 Subject: [PATCH] linker-defs: Increase the number of kernel objects Required to compile large samples/tests. Signed-off-by: Adithya Baglody --- include/linker/linker-defs.h | 4 ++-- include/misc/util.h | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/include/linker/linker-defs.h b/include/linker/linker-defs.h index a939c69d291..19be634715f 100644 --- a/include/linker/linker-defs.h +++ b/include/linker/linker-defs.h @@ -111,8 +111,8 @@ #ifndef NUM_KERNEL_OBJECT_FILES #error "Expected NUM_KERNEL_OBJECT_FILES to be defined" -#elif NUM_KERNEL_OBJECT_FILES > 19 -#error "Max supported kernel objects is 19." +#elif NUM_KERNEL_OBJECT_FILES > 32 +#error "Max supported kernel objects is 32." /* TODO: Using the preprocessor to do this was a mistake. Rewrite to scale better. e.g. by aggregating the kernel objects into two archives like KBuild did.*/ diff --git a/include/misc/util.h b/include/misc/util.h index 9b16498cebb..2ba6b5f8517 100644 --- a/include/misc/util.h +++ b/include/misc/util.h @@ -241,6 +241,27 @@ static inline s64_t arithmetic_shift_right(s64_t value, u8_t shift) #define UTIL_DEC_17 16 #define UTIL_DEC_18 17 #define UTIL_DEC_19 18 +#define UTIL_DEC_20 19 +#define UTIL_DEC_21 20 +#define UTIL_DEC_22 21 +#define UTIL_DEC_23 22 +#define UTIL_DEC_24 23 +#define UTIL_DEC_25 24 +#define UTIL_DEC_26 25 +#define UTIL_DEC_27 26 +#define UTIL_DEC_28 27 +#define UTIL_DEC_29 28 +#define UTIL_DEC_30 29 +#define UTIL_DEC_31 30 +#define UTIL_DEC_32 31 +#define UTIL_DEC_33 32 +#define UTIL_DEC_34 33 +#define UTIL_DEC_35 34 +#define UTIL_DEC_36 35 +#define UTIL_DEC_37 36 +#define UTIL_DEC_38 37 +#define UTIL_DEC_39 38 +#define UTIL_DEC_40 39 #define UTIL_CHECK_N(x, n, ...) n #define UTIL_CHECK(...) UTIL_CHECK_N(__VA_ARGS__, 0,)