`strip: X.so could not create temporary file to hold stripped copy: cause of error unknown`
Andreas Schwab
schwab@linux-m68k.org
Wed Feb 22 00:24:57 GMT 2023
On Feb 22 2023, Alan Modra via Binutils wrote:
> On Tue, Feb 21, 2023 at 08:43:56PM +0000, Paul Naidoo wrote:
>> |strip --remove-section=.note.ABI-tag
>> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5|
>>
>> However executing the command returns the error: |strip:
>> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: could not create temporary file
>> to hold stripped copy: cause of error unknown|
>
> You don't have write access in /usr/lib/x86_64-linux-gnu/.
I think this will improve the error message:
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index cf830442b3c..98c567bd955 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4884,6 +4884,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.39.1
--
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