[binutils-gdb] Enable "size" as a dumpprog in ld

Alan Modra amodra@sourceware.org
Sat Feb 5 07:09:06 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd8adbf3017272877c7e196e2e326f888f207bd9

commit cd8adbf3017272877c7e196e2e326f888f207bd9
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Feb 5 17:35:09 2022 +1030

    Enable "size" as a dumpprog in ld
    
    binutils/
            * testsuite/lib/binutils-common.exp (run_dump_test): Reference
            global SIZE and SIZEFLAGS.
    ld/
            * testsuite/config/default.exp: Define SIZE and SIZEFLAGS.

Diff:
---
 binutils/testsuite/lib/binutils-common.exp | 1 +
 ld/testsuite/config/default.exp            | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 2a2aaf4a17d..55b96980e05 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -866,6 +866,7 @@ proc run_dump_test { name {extra_options {}} } {
     global ADDR2LINE ADDR2LINEFLAGS AS ASFLAGS CC_FOR_TARGET CFLAGS_FOR_TARGET
     global ELFEDIT ELFEDITFLAGS LD LDFLAGS NM NMFLAGS OBJCOPY OBJCOPYFLAGS
     global OBJDUMP OBJDUMPFLAGS READELF READELFFLAGS STRIP STRIPFLAGS
+    global SIZE SIZEFLAGS
     global copyfile env runtests srcdir subdir verbose
     global DT_RELR_LDFLAGS NO_DT_RELR_LDFLAGS
 
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 2c3cec68434..103b426bbd8 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -301,6 +301,14 @@ if ![info exists READELFFLAGS] then {
     set READELFFLAGS {}
 }
 
+if ![info exists SIZE] then {
+    set SIZE [findfile $base_dir/../binutils/size]
+}
+
+if ![info exists SIZEFLAGS] then {
+    set SIZEFLAGS ""
+}
+
 if ![info exists ELFEDIT] then {
     set ELFEDIT [findfile $base_dir/../binutils/elfedit]
 }


More information about the Binutils-cvs mailing list