#define _ENDLIT .text .L$_subsec
#define _LTORG .L$_subsec = .L$_subsec + 2; .text .L$_subsec
-// ELF section types.
-#if __ELF__
-# if CPUFAM_ARMEL
-# define _SECTTY(ty) %ty
-# else
-# define _SECTTY(ty) @ty
-# endif
-#endif
-
-// Section selection.
-#define TEXT .text .L$_subsec
-#if ABI_WIN
-# define RODATA .section .rdata, "dr"
-#elif __ELF__
-# define RODATA .section .rodata, "a", _SECTTY(progbits)
-#else
-# define RODATA TEXT
-#endif
-#define DATA .data
-
// Announcing an internal function.
#define INTFUNC(name) \
TYPE_FUNC(name); \
#if __ELF__
-// Special arrangements for position-independent code.
-#if __PIC__ || __PIE__
-# define WANT_PIC 1
+// Section types.
+#if CPUFAM_ARMEL
+# define _SECTTY(ty) %ty
+#else
+# define _SECTTY(ty) @ty
#endif
+// Section selection.
+#define RODATA .section .rodata, "a", _SECTTY(progbits)
+
// Additional symbol metadata.
#define TYPE_FUNC(name) .type name, STT_FUNC
#define TYPE_OBJ(name) .type name, STT_OBJECT
#define SIZE_OBJ(name) .size name, . - name
+// Special arrangements for position-independent code.
+#if __PIC__ || __PIE__
+# define WANT_PIC 1
+#endif
+
+// Don't make the stack executable by default.
+#ifndef FORCE_EXECUTABLE_STACK
+ .pushsection .note.GNU-stack, "", _SECTTY(progbits)
+ .popsection
+#endif
+
#endif
///--------------------------------------------------------------------------
# define F(name) _##name
#endif
+// Section selection.
+#define RODATA .section .rdata, "dr"
+
#endif
///--------------------------------------------------------------------------
# define ENDFUNC_HOOK(_)
#endif
+// Section selection.
+#ifndef TEXT
+# define TEXT .text .L$_subsec
+#endif
+#ifndef RODATA
+# define RODATA TEXT
+#endif
+#ifndef DATA
+# define DATA .data
+#endif
+
+// Symbol decoration.
#ifndef F
# ifdef SYM_USCORE
# define F(name) _##name
# define SIZE_OBJ(name)
#endif
-#if __ELF__ && !defined(FORCE_EXECUTABLE_STACK)
- .pushsection .note.GNU-stack, "", _SECTTY(progbits)
- .popsection
-#endif
-
///----- That's all, folks --------------------------------------------------
#endif