Browse Source

On zarch don't produce objects from assembler with a writable stack section

On z-series, the current version of the GNU toolchain produces warnings
such as:
```
/usr/lib64/gcc/[...]/s390x-suse-linux/bin/ld: warning: ztrmm_kernel_RC_Z14.o: missing .note.GNU-stack section implies
executable stack
/usr/lib64/[...]/s390x-suse-linux/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
```
To prevent this message and make sure we are future proof, add
```
	.section        .note.GNU-stack,"",@progbits
```
Also add the `.size` bit to give the asm defined functions a proper size
in the symbol table.

Signed-off-by: Egbert Eich <eich@suse.com>
tags/v0.3.30
Egbert Eich 6 months ago
parent
commit
ea6515c4b3
6 changed files with 19 additions and 2 deletions
  1. +9
    -2
      common_zarch.h
  2. +2
    -0
      kernel/zarch/ctrmm4x4V.S
  3. +2
    -0
      kernel/zarch/gemm8x4V.S
  4. +2
    -0
      kernel/zarch/strmm8x4V.S
  5. +2
    -0
      kernel/zarch/trmm8x4V.S
  6. +2
    -0
      kernel/zarch/ztrmm4x4V.S

+ 9
- 2
common_zarch.h View File

@@ -103,9 +103,16 @@ static inline int blas_quickdivide(blasint x, blasint y){
.global REALNAME ;\
.type REALNAME, %function ;\
REALNAME:

#define EPILOGUE
#if defined(__ELF__) && defined(__linux__)
# define GNUSTACK .section .note.GNU-stack,"",@progbits
#else
# define GNUSTACK
#endif

#define EPILOGUE \
.size REALNAME, .-REALNAME; \
GNUSTACK

#define PROFCODE



+ 2
- 0
kernel/zarch/ctrmm4x4V.S View File

@@ -714,6 +714,8 @@ ld %f10,136(%r15)
ld %f11,144(%r15)
ld %f12,152(%r15)
br %r14

EPILOGUE
.end




+ 2
- 0
kernel/zarch/gemm8x4V.S View File

@@ -604,6 +604,8 @@ ALIGN_2
/*end*/
lmg %r6,%r12,48(%r15)
br %r14

EPILOGUE
.end




+ 2
- 0
kernel/zarch/strmm8x4V.S View File

@@ -845,6 +845,8 @@ ALIGN_2
lmg %r6,%r12,48(%r15)
#endif
br %r14

EPILOGUE
.end




+ 2
- 0
kernel/zarch/trmm8x4V.S View File

@@ -864,6 +864,8 @@ ALIGN_2
lmg %r6,%r12,48(%r15)
#endif
br %r14

EPILOGUE
.end




+ 2
- 0
kernel/zarch/ztrmm4x4V.S View File

@@ -719,6 +719,8 @@ ld %f10,136(%r15)
ld %f11,144(%r15)
ld %f12,152(%r15)
br %r14

EPILOGUE
.end




Loading…
Cancel
Save