aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-08-14 12:01:44 +0930
committerAlan Modra <amodra@gmail.com>2023-08-19 12:41:32 +0930
commit0e1b3420fbb2a3022a1ceac49ce37af3e59d0856 (patch)
tree5015fb4c694faf56968dbd4629024907d70edf6b /sim
parentb92b89993c8e30bed6665b63c0308034932298c2 (diff)
downloadgdb-0e1b3420fbb2a3022a1ceac49ce37af3e59d0856.zip
gdb-0e1b3420fbb2a3022a1ceac49ce37af3e59d0856.tar.gz
gdb-0e1b3420fbb2a3022a1ceac49ce37af3e59d0856.tar.bz2
sim prune_warnings
Remove some of the warnings generated by newer versions of ld. * testsuite/lib/sim-defs.exp (prune_warnings_extra): New. Arrange to run it from prune_warnings.
Diffstat (limited to 'sim')
-rw-r--r--sim/testsuite/lib/sim-defs.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 5528d64..54860f2 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -651,3 +651,22 @@ proc slurp_options { file } {
close $f
return $opt_array
}
+
+proc prune_warnings_extra { text } {
+
+ regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*missing \\.note\\.GNU-stack section\[^\n\]*\n?)+" $text "\\1" text
+ regsub -all "(^|\n)(\[^\n\]*: NOTE: This behaviour is deprecated\[^\n\]*\n?)+" $text "\\1" text
+
+ regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*has a LOAD segment with RWX permissions\[^\n\]*\n?)+" $text "\\1" text
+
+ return $text
+}
+
+if { [info procs saved-prune_warnings] == [list] } {
+ rename prune_warnings saved-prune_warnings
+ proc prune_warnings { text } {
+ set text [saved-prune_warnings $text]
+ set text [prune_warnings_extra $text]
+ return $text
+ }
+}