summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-07-09 14:23:51 +0200
committerDamjan Marion <dmarion@me.com>2020-07-16 21:42:40 +0000
commit01a103bec1771a22ca244de0d31ba91937243dd6 (patch)
treea1286cddd5ef68e1e25828e42b93b90c69c78810 /src/vlib
parent49338494398e65e6ee24d76b06e64b17e99bc815 (diff)
vlib: fix asan compilation with gcc
clang tends to force alignment of all sections when compiling for address sanitizer, confusing VPP plugin infra. On the contrary, GCC does not support this attribute on sections. Selectively enable it depending upon the compiler. Type: fix Fixes: cea46522e79637f6ec37c03ec3fbeb87b160a378 Change-Id: I2dd6e52e70e6b4d89c101171cafc813e175ec472 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/unix/plugin.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/unix/plugin.h b/src/vlib/unix/plugin.h
index a52c57bef7b..c9a33ccd96a 100644
--- a/src/vlib/unix/plugin.h
+++ b/src/vlib/unix/plugin.h
@@ -122,7 +122,7 @@ u8 *vlib_get_vat_plugin_path (void);
#define VLIB_PLUGIN_REGISTER() \
vlib_plugin_registration_t vlib_plugin_registration \
- CLIB_NOSANITIZE_ADDR \
+ CLIB_NOSANITIZE_PLUGIN_REG_SECTION \
__attribute__((__section__(".vlib_plugin_registration")))
/* Call a plugin init function: used for init function dependencies. */