From 6a8d296f9383dd25ec381e2ab136a33823d140e5 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 5 Dec 2011 22:47:46 +1030 Subject: [PATCH] configurator: HAVE_SECTION_START_STOP --- config.h | 1 + tools/configurator/configurator.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/config.h b/config.h index 03b8c5bb..5d2031ed 100644 --- a/config.h +++ b/config.h @@ -42,6 +42,7 @@ #define HAVE_MMAP 1 #define HAVE_PROC_SELF_MAPS 1 #define HAVE_QSORT_R_PRIVATE_LAST 1 +#define HAVE_SECTION_START_STOP 1 #define HAVE_STACK_GROWS_UPWARDS 0 #define HAVE_STATEMENT_EXPR 1 #define HAVE_TYPEOF 1 diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 8353f088..802559de 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -181,6 +181,13 @@ static struct test tests[] = { " qsort_r(array, 3, sizeof(int), cmp, &called);\n" " return called && array[0] == 2 && array[1] == 5 && array[2] == 9 ? 0 : 1;\n" "}\n" }, + { "HAVE_SECTION_START_STOP", + DEFINES_FUNC, NULL, + "static void *__attribute__((__section__(\"mysec\"))) p = &p;\n" + "static int func(void) {\n" + " extern void *__start_mysec[], *__stop_mysec[];\n" + " return __stop_mysec - __start_mysec;\n" + "}\n" }, { "HAVE_STACK_GROWS_UPWARDS", DEFINES_EVERYTHING|EXECUTE, NULL, "static long nest(const void *base, unsigned int i)\n" "{\n" -- 2.39.2