mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-30 16:13:51 +00:00
Flip section linking tests
This commit is contained in:
parent
5636edfe20
commit
b516ff686d
12
section.h
12
section.h
@ -25,16 +25,16 @@
|
||||
#define SECTION_START(X) __start_##X
|
||||
#define SECTION_END(X) __stop_##X
|
||||
|
||||
#if defined(HAVE_VAR_ATTRIBUTE_SECTION_SEG)
|
||||
# define _SECTION_ATTRIBUTE(X) __section__("__DATA,__"#X)
|
||||
# define DECLARE_SECTION(TYPE, X) \
|
||||
extern TYPE SECTION_START(X)[] __asm("section$start$__DATA$__" #X);\
|
||||
extern TYPE SECTION_END(X)[] __asm("section$end$__DATA$__" #X)
|
||||
#elif defined(HAVE_VAR_ATTRIBUTE_SECTION)
|
||||
#if defined(HAVE_VAR_ATTRIBUTE_SECTION)
|
||||
# define _SECTION_ATTRIBUTE(X) __section__(#X)
|
||||
# define DECLARE_SECTION(TYPE, X) \
|
||||
extern TYPE SECTION_START(X)[];\
|
||||
extern TYPE SECTION_END(X)[]
|
||||
#elif defined(HAVE_VAR_ATTRIBUTE_SECTION_SEG)
|
||||
# define _SECTION_ATTRIBUTE(X) __section__("__DATA,__"#X)
|
||||
# define DECLARE_SECTION(TYPE, X) \
|
||||
extern TYPE SECTION_START(X)[] __asm("section$start$__DATA$__" #X);\
|
||||
extern TYPE SECTION_END(X)[] __asm("section$end$__DATA$__" #X)
|
||||
#else
|
||||
#error "Compiler does not support __attribute__(section())"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user