prune .note.GNU-stack warning from testsuite

binutils/
	* testsuite/lib/binutils-common.exp (prune_warnings_extra): Remove
	.note.GNU-stack warning.
	(run_dump_test): Call prune_warnings for ld and objcopy output.
ld/
	* testsuite/ld-elf/elf.exp: Disable prune_warnings_extra temporarily
	around test for absent .note.GNU-stack
	* testsuite/ld-cris/globsymw2.s,
	* testsuite/ld-cris/warn3.d: Modify "is not implemented" message
	to avoid dejagnu prune_warnings.
This commit is contained in:
Alan Modra
2022-04-21 08:49:30 +09:30
parent afa7150c8d
commit 333cd559ba
4 changed files with 15 additions and 8 deletions

View File

@@ -637,6 +637,7 @@ proc prune_warnings_extra { text } {
}
# PR binutils/23898: It is OK to have gaps in build notes.
regsub -all "(^|\n)(\[^\n\]*: Warning: Gap in build notes detected from\[^\n\]*\n?)+" $text "\\1" text
regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*missing \\.note\\.GNU-stack section\[^\n\]*\n?)+" $text "\\1" text
return $text
}
@@ -1326,7 +1327,7 @@ proc run_dump_test { name {extra_options {}} } {
send_log "$cmd\n"
set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "dump.tmp"]
remote_upload host "dump.tmp"
append comp_output [file_contents "dump.tmp"]
append comp_output [prune_warnings [file_contents "dump.tmp"]]
remote_file host delete "dump.tmp"
remote_file build delete "dump.tmp"
set cmdret [lindex $cmdret 0]
@@ -1343,7 +1344,7 @@ proc run_dump_test { name {extra_options {}} } {
send_log "$cmd\n"
set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "dump.tmp"]
remote_upload host "dump.tmp"
append comp_output [file_contents "dump.tmp"]
append comp_output [prune_warnings [file_contents "dump.tmp"]]
remote_file host delete "dump.tmp"
remote_file build delete "dump.tmp"
set cmdret [lindex $cmdret 0]