]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
objcopy binary symbol type check
authorAlan Modra <amodra@gmail.com>
Fri, 14 Nov 2025 01:20:59 +0000 (11:50 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 14 Nov 2025 01:20:59 +0000 (11:50 +1030)
This exposes an error on alpha-linux-gnuecoff where the start and end
syms are given the wrong storage class.

* testsuite/binutils-all/objcopy.exp (binary_symbol): Tighten
symbol type checking.

binutils/testsuite/binutils-all/objcopy.exp

index 43814ac5a70f5d875185f093e85cdb5cdce9f4b8..5f1f7c6b49eda190738f2a5c64deb958e1a6f7b5 100644 (file)
@@ -1631,8 +1631,11 @@ proc binary_symbol {name file args sym_prefix} {
        return
     }
 
-    foreach sym [list "start" "end" "size"] {
-       set exp "^\[0-9a-fA-F\]+ +\[TtDdA\] +${sym_prefix}_${sym}$"
+    set syms [list {D start} {D end} {A size}]
+    foreach e $syms {
+       set typ [lindex $e 0]
+       set sym [lindex $e 1]
+       set exp "^\[0-9a-fA-F\]+ +${typ} +${sym_prefix}_${sym}$"
        if ![regexp -line $exp $got] {
            send_log "failed to match: $exp\n"
            fail $test