X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/1aa5bfa88ec9a7eeeff47e076242b2e9eda1d538..645fcce0830342b644cc16e71e28790c838d9415:/base/asm-common.h diff --git a/base/asm-common.h b/base/asm-common.h index 946f8608..e5e0f2f2 100644 --- a/base/asm-common.h +++ b/base/asm-common.h @@ -35,6 +35,26 @@ #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 external function. #define FUNC(name) \ .globl F(name); \