Fix inconsistencies with GNU-stack note:
- always use __ELF__ && __linux, not just __ELF__ or just __linux__ - remember to pop back to the previous section where it is missing XXX: need to file this bug with the GNU folks.
This commit is contained in:
parent
b16a5c9dec
commit
bb5915f98c
@ -22,8 +22,9 @@
|
||||
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack,""
|
||||
.previous
|
||||
#endif
|
||||
|
||||
.set noreorder
|
||||
|
@ -853,7 +853,7 @@ __morestack_make_guard:
|
||||
.quad __morestack_load_mmap
|
||||
#endif
|
||||
|
||||
#ifdef __ELF__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
.section .note.GNU-split-stack,"",@progbits
|
||||
.section .note.GNU-no-split-stack,"",@progbits
|
||||
|
@ -107,6 +107,6 @@ GTM_longjmp:
|
||||
ret
|
||||
.end GTM_longjmp
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", @progbits
|
||||
#endif
|
||||
|
@ -159,6 +159,6 @@ GTM_longjmp:
|
||||
cfi_endproc
|
||||
.size GTM_longjmp, . - GTM_longjmp
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", %progbits
|
||||
#endif
|
||||
|
@ -428,6 +428,6 @@ FUNC GTM_longjmp
|
||||
cfi_endproc
|
||||
END GTM_longjmp
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", @progbits
|
||||
#endif
|
||||
|
@ -105,4 +105,6 @@ GTM_longjmp:
|
||||
|
||||
.size GTM_longjmp, .-GTM_longjmp
|
||||
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", @progbits
|
||||
#endif
|
||||
|
@ -117,6 +117,6 @@ GTM_longjmp:
|
||||
|
||||
.size GTM_longjmp, . - GTM_longjmp
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", %progbits
|
||||
#endif
|
||||
|
@ -92,6 +92,6 @@ GTM_longjmp:
|
||||
cfi_endproc
|
||||
.size GTM_longjmp, . - GTM_longjmp
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", @progbits
|
||||
#endif
|
||||
|
@ -142,6 +142,6 @@ SYM(GTM_longjmp):
|
||||
HIDDEN(GTM_longjmp)
|
||||
SIZE(GTM_longjmp)
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
.section .note.GNU-stack, "", @progbits
|
||||
#endif
|
||||
|
@ -166,7 +166,7 @@ __tsan_report_race_thunk:
|
||||
ret
|
||||
.cfi_endproc
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__ELF__) && defined(__linux__)
|
||||
/* We do not need executable stack. */
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user