[PATCH] strip: Don't check target_defaulted in input BFD
Alan Modra
amodra@gmail.com
Thu Jul 31 02:35:11 GMT 2025
On Wed, Jul 30, 2025 at 06:49:08PM -0700, H.J. Lu wrote:
> On Wed, Jul 30, 2025 at 6:27 PM Alan Modra <amodra@gmail.com> wrote:
> > Yes, I typoed that. The tests need some tweaking as they both fail
> > with --enable-targets=all.
> >
>
> Like this?
That will do I guess. It would be nicer to run readelf and check the
machine if strip succeeded.
> diff --git a/binutils/testsuite/binutils-all/x86-64/x86-64.exp
> b/binutils/testsuite/binutils-all/x86-64/x86-64.exp
> index a3fe6b13a7c..89f12fe15a6 100644
> --- a/binutils/testsuite/binutils-all/x86-64/x86-64.exp
> +++ b/binutils/testsuite/binutils-all/x86-64/x86-64.exp
> @@ -261,7 +261,10 @@ set test $subdir/[file tail $t]
> set testname [file rootname $test]
> verbose $testname
> set obj tmpdir/pr33230.o
> -if {[catch "system \"bzip2 -dc $t > $obj\""] != 0} {
> +catch "exec $STRIP --help" got
> +if { [regexp "elf64-littleaarch64" $got] } {
> + untested "$testname"
> +} elseif { [catch "system \"bzip2 -dc $t > $obj\""] != 0 } {
> untested "bzip2 -dc ($testname)"
> } else {
> set cmd "$STRIP $obj -o ${obj}.strip"
>
> --
> H.J.
--
Alan Modra
More information about the Binutils
mailing list