Skip to content
Permalink
Browse files

Linux X86-64 - Add stack executable disable to assembly (.[Ss]) objects.

  • Loading branch information...
gklimowicz committed May 2, 2019
1 parent 819bad1 commit cf14777dd3518924f437c16d18c9beb089727b8a
Showing with 24 additions and 0 deletions.
  1. +12 −0 runtime/flang/directives.h
  2. +12 −0 runtime/libpgmath/lib/x86_64/directives.h
@@ -67,6 +67,18 @@
#define F4 %xmm3

#elif defined(LINUX_ELF) || defined(TARGET_LINUX_X86) || defined(TARGET_LINUX_X8664)
/*
* For X86-64 ELF enabled objects, disable stack execute bit.
*
* Assume that this file is one of the first include files listed in assembly
* source files that need preprocessing.
*/
#if ! defined(NOTE_GNU_STACK)
# define NOTE_GNU_STACK
.section .note.GNU-stack,"",%progbits
.text
#endif // #if ! defined(NOTE_GNU_STACK)

#define ENT(n) n
#define ALN_WORD .align 4
#define ALN_FUNC .align 16
@@ -67,6 +67,18 @@
#define F4 %xmm3

#elif defined(LINUX_ELF) || defined(TARGET_LINUX_X86) || defined(TARGET_LINUX_X8664)
/*
* For X86-64 ELF enabled objects, disable stack execute bit.
*
* Assume that this file is one of the first include files listed in assembly
* source files that need preprocessing.
*/
#if ! defined(NOTE_GNU_STACK)
# define NOTE_GNU_STACK
.section .note.GNU-stack,"",%progbits
.text
#endif // #if ! defined(NOTE_GNU_STACK)

#define ENT(n) n
#define ALN_WORD .align 4
#define ALN_FUNC .align 16

0 comments on commit cf14777

Please sign in to comment.
You can’t perform that action at this time.