[binutils-gdb] objcopy: Set bfd_error_system_call before reporting error from make_tempname

Andreas Schwab schwab@sourceware.org
Tue Jan 13 10:21:07 GMT 2026


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

commit 1b87d9d73297ea5c4e4462f46510b107208321a0
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Tue Feb 21 22:32:11 2023 +0100

    objcopy: Set bfd_error_system_call before reporting error from make_tempname

Diff:
---
 binutils/objcopy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index ebd2a85c0f6..7aef75f63ba 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -5096,6 +5096,7 @@ strip_main (int argc, char *argv[])
 
       if (tmpname == NULL)
 	{
+	  bfd_set_error (bfd_error_system_call);
 	  bfd_nonfatal_message (argv[i], NULL, NULL,
 				_("could not create temporary file to hold stripped copy"));
 	  status = 1;


More information about the Binutils-cvs mailing list