diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2018-08-09 22:50:19 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2021-02-01 17:18:02 +0100 |
commit | 8e427c293860576df43ead3639bac807e2a43b03 (patch) | |
tree | 88a02353048fce9fb350d7a1231322fb5830d5c7 /configure.ac | |
parent | lib: move frr_weak_random to header file (diff) | |
download | frr-8e427c293860576df43ead3639bac807e2a43b03.tar.xz frr-8e427c293860576df43ead3639bac807e2a43b03.zip |
lib: "xref" identifier infrastructure
This adds the machinery for cross reference points (hence "xref") for
things to be annotated with source code location or other metadata
and/or to be uniquely identified and found at runtime or by dissecting
executable files.
The extraction tool to walk down an ELF file is done and working but
needs some more cleanup and will be added in a separate commit.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f82aa7a2a..09ec23ab7 100755 --- a/configure.ac +++ b/configure.ac @@ -411,6 +411,21 @@ else ]) fi +AC_MSG_CHECKING([whether linker supports __start/stop_section symbols]) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include <stdio.h> +int __attribute__((section("secttest"))) var = 1; +extern int __start_secttest, __stop_secttest; +]], [[ + void *a = &var, *b = &__start_secttest, *c = &__stop_secttest; + printf("%p %p %p\n", a, b, c); +]])], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SECTION_SYMS, 1, [have __start/stop_section symbols]) +], [ + AC_MSG_RESULT(no) +]) + dnl ---------- dnl Essentials dnl ---------- |