Skip to content

Commit e2482c9

Browse files
authored
Add stack markings for GNU to fmod assembly files (#307)
This adds stack markings to the missing fmod .S files, otherwise the final libopenlibm object file gets marked with an executable stack. Output when compiling from source on Gentoo Linux: ``` * QA Notice: The following files contain writable and executable sections * Files with such sections will not work properly (or at all!) on some * architectures/operating systems. A bug should be filed at * https://bugs.gentoo.org/ to make sure the issue is fixed. * For more information, see: * * https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart * * Please include the following list of files in your report: * Note: Bugs should be filed for the respective maintainers * of the package in question and not [email protected]. * RWX --- --- usr/lib64/libopenlibm.so.4.0 ```
1 parent d66f477 commit e2482c9

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

amd64/e_fmod.S

+5
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ ENTRY(fmod)
4949
fstp %st
5050
ret
5151
END(fmod)
52+
53+
/* Enable stack protection */
54+
#if defined(__ELF__)
55+
.section .note.GNU-stack,"",%progbits
56+
#endif

amd64/e_fmodf.S

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ ENTRY(fmodf)
1919
fstp %st
2020
ret
2121
END(fmodf)
22+
23+
/* Enable stack protection */
24+
#if defined(__ELF__)
25+
.section .note.GNU-stack,"",%progbits
26+
#endif

amd64/e_fmodl.S

+5
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ ENTRY(fmodl)
4545
fstp %st(1)
4646
ret
4747
END(fmodl)
48+
49+
/* Enable stack protection */
50+
#if defined(__ELF__)
51+
.section .note.GNU-stack,"",%progbits
52+
#endif

0 commit comments

Comments
 (0)