CAT_XDEFINE cglobaled_, %2, 1
%endif
%xdefine current_function %2
- %ifidn __OUTPUT_FORMAT__,elf
+ %ifidn __OUTPUT_FORMAT__,elf32
+ global %2:function %%VISIBILITY
+ %elifidn __OUTPUT_FORMAT__,elf64
global %2:function %%VISIBILITY
%else
global %2
%macro const 1-2+
%xdefine %1 mangle(private_prefix %+ _ %+ %1)
- %ifidn __OUTPUT_FORMAT__,elf
+ %ifidn __OUTPUT_FORMAT__,elf32
+ global %1:data hidden
+ %elifidn __OUTPUT_FORMAT__,elf64
global %1:data hidden
%else
global %1
; This is needed for ELF, otherwise the GNU linker assumes the stack is
; executable by default.
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
+SECTION .note.GNU-stack noalloc noexec nowrite progbits
+%elifidn __OUTPUT_FORMAT__,elf64
SECTION .note.GNU-stack noalloc noexec nowrite progbits
%endif