Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String: prevent executable stacks on GNU targets #649

Merged
merged 1 commit into from Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CoreFoundation/Base.subproj/CFAsmMacros.h
Expand Up @@ -14,5 +14,11 @@
#define CONCAT_EXPANDED(a,b) CONCAT(a,b)
#define _C_LABEL(name) CONCAT_EXPANDED(__USER_LABEL_PREFIX__,name)

#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__)
#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
#else
#define NO_EXEC_STACK_DIRECTIVE
#endif

#endif

3 changes: 3 additions & 0 deletions CoreFoundation/String.subproj/CFCharacterSetData.S
Expand Up @@ -20,3 +20,6 @@ _C_LABEL(__CFCharacterSetBitmapDataEnd):
.global _C_LABEL(__CFCharacterSetBitmapDataSize)
_C_LABEL(__CFCharacterSetBitmapDataSize):
.int _C_LABEL(__CFCharacterSetBitmapDataEnd) - _C_LABEL(__CFCharacterSetBitmapData)

NO_EXEC_STACK_DIRECTIVE

3 changes: 3 additions & 0 deletions CoreFoundation/String.subproj/CFUniCharPropertyDatabase.S
Expand Up @@ -20,3 +20,6 @@ _C_LABEL(__CFUniCharPropertyDatabaseEnd):
.global _C_LABEL(__CFUniCharPropertyDatabaseSize)
_C_LABEL(__CFUniCharPropertyDatabaseSize):
.int _C_LABEL(__CFUniCharPropertyDatabaseEnd) - _C_LABEL(__CFUniCharPropertyDatabase)

NO_EXEC_STACK_DIRECTIVE

3 changes: 3 additions & 0 deletions CoreFoundation/String.subproj/CFUnicodeData.S
Expand Up @@ -34,3 +34,6 @@ _C_LABEL(__CFUnicodeDataLEnd):
_C_LABEL(__CFUnicodeDataLSize):
.int _C_LABEL(__CFUnicodeDataLEnd) - _C_LABEL(__CFUnicodeDataL)
#endif

NO_EXEC_STACK_DIRECTIVE