Move no-exec-stack sections outside of #ifs.
When building with |OPENSSL_NO_ASM|, the section that marks assembly files as no-exec-stack will currently be omitted. That results in an empty assembly file but that's still enough to trigger warnings: warning: crypto_tests/trampoline-x86_64.o: missing .note.GNU-stack section implies executable stack This change makes it so that the section marker will always be emitted, even if the file is otherwise empty. Change-Id: I2d08d34ed9dbe9e9592c88dcd42d3ba4fa3d7652 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/38084 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
12049fd3ad
commit
c48c8b6f64
@ -2129,8 +2129,8 @@ mov sp,r12
|
||||
vpop {q4,q5,q6,q7}
|
||||
bx lr
|
||||
|
||||
#endif /* !OPENSSL_NO_ASM && __arm__ && !__APPLE__ */
|
||||
|
||||
#if defined(__ELF__)
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#endif
|
||||
|
||||
#endif /* !OPENSSL_NO_ASM && __arm__ && !__APPLE__ */
|
||||
|
@ -8460,8 +8460,8 @@ ret
|
||||
.cfi_endproc
|
||||
.size poly_Rq_mul,.-poly_Rq_mul
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__ELF__)
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -228,10 +228,10 @@ while(my $line=<>) {
|
||||
print "\n";
|
||||
}
|
||||
|
||||
# See https://www.airs.com/blog/archives/518.
|
||||
print ".section\t.note.GNU-stack,\"\",\%progbits\n" if ($flavour =~ /linux/);
|
||||
|
||||
print "#endif\n" if ($flavour eq "linux32" || $flavour eq "linux64");
|
||||
print "#endif // !OPENSSL_NO_ASM\n";
|
||||
|
||||
# See https://www.airs.com/blog/archives/518.
|
||||
print ".section\t.note.GNU-stack,\"\",\%progbits\n" if ($flavour =~ /linux/);
|
||||
|
||||
close STDOUT;
|
||||
|
@ -309,9 +309,9 @@ while($line=<>) {
|
||||
print "\n";
|
||||
}
|
||||
|
||||
print "#endif // !OPENSSL_NO_ASM && __powerpc64__\n";
|
||||
|
||||
# See https://www.airs.com/blog/archives/518.
|
||||
print ".section\t.note.GNU-stack,\"\",\@progbits\n" if ($flavour =~ /linux/);
|
||||
|
||||
print "#endif // !OPENSSL_NO_ASM && __powerpc64__\n";
|
||||
|
||||
close STDOUT;
|
||||
|
@ -1260,10 +1260,9 @@ while(defined(my $line=<>)) {
|
||||
|
||||
print "\n$current_segment\tENDS\n" if ($current_segment && $masm);
|
||||
print "END\n" if ($masm);
|
||||
print "#endif\n" if ($gas);
|
||||
# See https://www.airs.com/blog/archives/518.
|
||||
print ".section\t.note.GNU-stack,\"\",\@progbits\n" if ($elf);
|
||||
print "#endif\n" if ($gas);
|
||||
|
||||
|
||||
close STDOUT;
|
||||
|
||||
|
@ -297,9 +297,9 @@ ___
|
||||
___
|
||||
}
|
||||
print @out;
|
||||
print "#endif\n" unless ($win32 || $netware);
|
||||
# See https://www.airs.com/blog/archives/518.
|
||||
print ".section\t.note.GNU-stack,\"\",\@progbits\n" if ($elf);
|
||||
print "#endif\n" unless ($win32 || $netware);
|
||||
}
|
||||
|
||||
sub ::asm_init
|
||||
|
@ -2022,8 +2022,8 @@ vst1.8 d4,[r0,: 64]
|
||||
add sp,sp,#0
|
||||
bx lr
|
||||
|
||||
#endif /* __arm__ && !OPENSSL_NO_ASM && !__APPLE__ */
|
||||
|
||||
#if defined(__ELF__)
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#endif
|
||||
|
||||
#endif /* __arm__ && !OPENSSL_NO_ASM && !__APPLE__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user