Skip to content

Commit a293066

Browse files
committed
Refs #262. Added executable stack markings.
1 parent 6e0db36 commit a293066

File tree

7 files changed

+46
-6
lines changed

7 files changed

+46
-6
lines changed

CONTRIBUTORS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,9 @@ In chronological order:
7979
* [2013-07-11] create openblas_get_parallel to retrieve information which parallelization
8080
model is used by OpenBLAS.
8181

82+
* Sébastien Fabbro <[email protected]>
83+
* [2013-07-24] Modify makefile to respect user's LDFLAGS
84+
* [2013-07-24] Add stack markings for GNU as arch-independent for assembler files
85+
8286
* [Your name or handle] <[email or website]>
8387
* [Date] [Brief summary of your changes]

common_alpha.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,17 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
150150
#define PROFCODE .prologue 0
151151
#endif
152152

153+
#if defined(__linux__) && defined(__ELF__)
154+
#define GNUSTACK .section .note.GNU-stack,"",%progbits
155+
#else
156+
#define GNUSTACK
157+
#endif
158+
153159
#define EPILOGUE \
154160
.end REALNAME; \
155-
.ident VERSION
161+
.ident VERSION; \
162+
GNUSTACK
163+
156164
#endif
157165

158166
#ifdef DOUBLE

common_ia64.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,15 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
379379
#define PROFCODE
380380
#endif
381381

382+
#if defined(__linux__) && defined(__ELF__)
383+
#define GNUSTACK .section .note.GNU-stack,"",%progbits
384+
#else
385+
#define GNUSTACK
386+
#endif
387+
382388
#define EPILOGUE \
383-
.endp REALNAME
389+
.endp REALNAME ; \
390+
GNUSTACK
384391

385392
#define START_ADDRESS 0x20000fc800000000UL
386393

common_mips64.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,17 @@ REALNAME: ;\
235235
.set noreorder ;\
236236
.set nomacro
237237

238+
#if defined(__linux__) && defined(__ELF__)
239+
#define GNUSTACK .section .note.GNU-stack,"",%progbits
240+
#else
241+
#define GNUSTACK
242+
#endif
243+
238244
#define EPILOGUE \
239245
.set macro ;\
240246
.set reorder ;\
241-
.end REALNAME
247+
.end REALNAME ;\
248+
GNUSTACK
242249

243250
#define PROFCODE
244251
#endif

common_sparc.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,17 @@ static __inline int blas_quickdivide(blasint x, blasint y){
199199
.type REALNAME, #function; \
200200
.proc 07; \
201201
REALNAME:;
202+
203+
#if defined(__linux__) && defined(__ELF__)
204+
#define GNUSTACK .section .note.GNU-stack,"",%progbits
205+
#else
206+
#define GNUSTACK
207+
#endif
208+
202209
#define EPILOGUE \
203-
.size REALNAME, .-REALNAME
210+
.size REALNAME, .-REALNAME; \
211+
GNUSTACK
212+
204213
#endif
205214

206215
#endif

common_x86.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
301301
#define PROFCODE
302302
#endif
303303

304-
#define EPILOGUE .size REALNAME, .-REALNAME
304+
#define EPILOGUE \
305+
.size REALNAME, .-REALNAME; \
306+
.section .note.GNU-stack,"",%progbits
305307

306308
#endif
307309

common_x86_64.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
372372
#define PROFCODE
373373
#endif
374374

375-
#define EPILOGUE .size REALNAME, .-REALNAME
375+
#define EPILOGUE \
376+
.size REALNAME, .-REALNAME; \
377+
.section .note.GNU-stack,"",%progbits
378+
376379

377380
#endif
378381

0 commit comments

Comments
 (0)