Skip to content

Commit 4483871

Browse files
fix(arm): guard .size directive in EPILOGUE for non-ELF targets
The `.size REALNAME, .-REALNAME` directive is valid for ELF targets but may be unnecessary or unsupported on Apple (Mach-O) and Windows (PE) assembly. Wrap the `.size` line in a conditional so that it is only emitted when not targeting __APPLE__ or _WIN32. This prevents potential assembler warnings or errors on those platforms while preserving the size directive for Linux/ELF builds. The GNUSTACK emission remains unchanged. Signed-off-by: minicx <minicx@disroot.org>
1 parent 969e444 commit 4483871

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

common_arm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ static inline int blas_quickdivide(blasint x, blasint y){
121121
#endif
122122

123123
#define EPILOGUE \
124+
#if !defined(__APPLE__) && !defined(_WIN32)
124125
.size REALNAME, .-REALNAME; \
126+
#endif
125127
GNUSTACK
126128

127129

0 commit comments

Comments
 (0)