[PATCH] objcopy: Set bfd_error_system_call before reporting error from make_tempname

Andreas Schwab schwab@linux-m68k.org
Mon Jan 12 22:13:34 GMT 2026


---
 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;
-- 
2.52.0


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Binutils mailing list