summaryrefslogtreecommitdiffstats
path: root/lib/memory.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:23 +0000
commitc15d6efd40655f717841d00839a43df1ead5cb26 (patch)
tree35d579f9a19170e2b39085669ca92533c2d161b4 /lib/memory.h
parentAdding upstream version 10.0.1. (diff)
downloadfrr-c15d6efd40655f717841d00839a43df1ead5cb26.tar.xz
frr-c15d6efd40655f717841d00839a43df1ead5cb26.zip
Adding upstream version 10.1.upstream/10.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/memory.h')
-rw-r--r--lib/memory.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/memory.h b/lib/memory.h
index ba437eb..65b99a5 100644
--- a/lib/memory.h
+++ b/lib/memory.h
@@ -69,14 +69,12 @@ struct memgroup {
#define DECLARE_MGROUP(name) extern struct memgroup _mg_##name
#define _DEFINE_MGROUP(mname, desc, ...) \
- struct memgroup _mg_##mname \
- __attribute__((section(".data.mgroups"))) = { \
- .name = desc, \
- .types = NULL, \
- .next = NULL, \
- .insert = NULL, \
- .ref = NULL, \
- __VA_ARGS__ \
+ struct memgroup _mg_##mname _DATA_SECTION("mgroups") = { \
+ .name = desc, \
+ .types = NULL, \
+ .next = NULL, \
+ .insert = NULL, \
+ .ref = NULL, \
}; \
static void _mginit_##mname(void) __attribute__((_CONSTRUCTOR(1000))); \
static void _mginit_##mname(void) \
@@ -105,13 +103,12 @@ struct memgroup {
/* end */
#define DEFINE_MTYPE_ATTR(group, mname, attr, desc) \
- attr struct memtype MTYPE_##mname[1] \
- __attribute__((section(".data.mtypes"))) = { { \
- .name = desc, \
- .next = NULL, \
- .n_alloc = 0, \
- .size = 0, \
- .ref = NULL, \
+ attr struct memtype MTYPE_##mname[1] _DATA_SECTION("mtypes") = { { \
+ .name = desc, \
+ .next = NULL, \
+ .n_alloc = 0, \
+ .size = 0, \
+ .ref = NULL, \
} }; \
static void _mtinit_##mname(void) __attribute__((_CONSTRUCTOR(1001))); \
static void _mtinit_##mname(void) \