- Takes no argument.
- Returns SME state in x0 and TPIDR2_EL0 in x1. */
-.hidden __aarch64_have_sme
+HIDDEN (__aarch64_have_sme)
variant_pcs (__arm_sme_state)
- Does not return a value.
- Can abort on failure (then registers are not preserved). */
-.hidden __aarch64_have_sme
+HIDDEN (__aarch64_have_sme)
variant_pcs (__arm_tpidr2_save)
/* Hidden alias used by __arm_za_disable. */
.global __libgcc_arm_tpidr2_save
-.hidden __libgcc_arm_tpidr2_save
+HIDDEN (__libgcc_arm_tpidr2_save)
.set __libgcc_arm_tpidr2_save, __arm_tpidr2_save
- Does not return a value.
- Can abort on failure (then registers are not preserved). */
-.hidden __aarch64_have_sme
+HIDDEN (__aarch64_have_sme)
-.hidden __libgcc_arm_tpidr2_save
+HIDDEN (__libgcc_arm_tpidr2_save)
variant_pcs (__arm_za_disable)
/* Hidden alias used by the unwinder. */
.global __libgcc_arm_za_disable
-.hidden __libgcc_arm_za_disable
+HIDDEN (__libgcc_arm_za_disable)
.set __libgcc_arm_za_disable, __arm_za_disable
# define AUTIASP
#endif
+#ifdef __ELF__
+#define HIDDEN(name) .hidden name
+#define SYMBOL_SIZE(name) .size name, .-name
+#define SYMBOL_TYPE(name, _type) .type name, _type
+#else
+#define HIDDEN(name)
+#define SYMBOL_SIZE(name)
+#define SYMBOL_TYPE(name, _type)
+#endif
+
/* Add a NT_GNU_PROPERTY_TYPE_0 note. */
#define GNU_PROPERTY(type, value) \
.section .note.gnu.property, "a"; \
#define ENTRY_ALIGN(name, align) \
.global name; \
- .type name,%function; \
+ SYMBOL_TYPE(name, %function); \
.balign align; \
name: \
.cfi_startproc; \
#define END(name) \
.cfi_endproc; \
- .size name, .-name
+ SYMBOL_SIZE(name)
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# <http://www.gnu.org/licenses/>.
+#include "aarch64-asm.h"
+
/* An executable stack is *not* required for these functions. */
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
# .init sections. Users may put any desired instructions in those
# sections.
-#ifdef __ELF__
-#define TYPE(x) .type x,function
-#else
-#define TYPE(x)
-#endif
-
# Note - this macro is complemented by the FUNC_END macro
# in crtn.S. If you change this macro you must also change
# that macro match.
.section ".init"
.align 2
.global _init
- TYPE(_init)
+ SYMBOL_TYPE(_init, function)
_init:
FUNC_START
.section ".fini"
.align 2
.global _fini
- TYPE(_fini)
+ SYMBOL_TYPE(_fini, function)
_fini:
FUNC_START
* indirectly, they do not need to start with a BTI instruction.
*/
+#include "aarch64-asm.h"
#include "auto-target.h"
/* Tell the assembler to accept LSE instructions. */
#endif
/* Declare the symbol gating the LSE implementations. */
- .hidden __aarch64_have_lse_atomics
+ HIDDEN(__aarch64_have_lse_atomics)
/* Turn size and memory model defines into mnemonic fragments. */
#if SIZE == 1
.text
.balign 16
.globl \name
- .hidden \name
- .type \name, %function
+ HIDDEN(\name)
+ SYMBOL_TYPE(\name, %function)
.cfi_startproc
\name:
.endm
.macro ENDFN name
.cfi_endproc
- .size \name, . - \name
+ SYMBOL_SIZE(\name)
.endm
/* Branch to LABEL if LSE is disabled. */