Added note.GNU-stack to x86 assembler files. It is needed
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 26 Jan 2008 19:40:23 +0000 (21:40 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 26 Jan 2008 19:40:23 +0000 (21:40 +0200)
when using non-executable stack.

src/liblzma/check/crc32_x86.S
src/liblzma/check/crc64_x86.S

index f1ae7f7..82cfb94 100644 (file)
@@ -215,3 +215,12 @@ lzma_crc32:
        ret
 
        .size   lzma_crc32, .-lzma_crc32
+
+/*
+ * This is needed to support non-executable stack. It's ugly to
+ * use __linux__ here, but I don't know a way to detect when
+ * we are using GNU assembler.
+ */
+#if defined(__ELF__) && defined(__linux__)
+       .section        .note.GNU-stack,"",@progbits
+#endif
index 7ad3d88..78935e6 100644 (file)
@@ -201,3 +201,12 @@ lzma_crc64:
        ret
 
        .size   lzma_crc64, .-lzma_crc64
+
+/*
+ * This is needed to support non-executable stack. It's ugly to
+ * use __linux__ here, but I don't know a way to detect when
+ * we are using GNU assembler.
+ */
+#if defined(__ELF__) && defined(__linux__)
+       .section        .note.GNU-stack,"",@progbits
+#endif