[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31191] New: objcopy leaves temporary files (and directorie
From: |
mooodyhunter at outlook dot com |
Subject: |
[Bug binutils/31191] New: objcopy leaves temporary files (and directories) in case of error |
Date: |
Mon, 25 Dec 2023 22:08:00 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31191
Bug ID: 31191
Summary: objcopy leaves temporary files (and directories) in
case of error
Product: binutils
Version: 2.42 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: mooodyhunter at outlook dot com
Target Milestone: ---
In case of objdump errors with "symbol `.debug_info' required but not present"
when running "objcopy -R .debug_info ./libsomething.a", it leaves temporary
files in the folder.
---
$ objcopy -R .debug_info ./libgfortran.a
objcopy: ./stftlphn/unix.o: symbol `.debug_info' required but not present
objcopy: ./stftlphn/unix.o: no symbols
---
OBSERVED: ./stftlphn/unix.o exists.
EXPECTED: no left-over temporary files.
reading the source code reveals:
1. objcopy.c, in copy_archive() around L3765, bfd_close is called but errored.
2. bfd_nonfatal_message is called and status set to 1
3. L3778, 3779: the bfd_close branch is taken, leaving l->obfd as NULL.
4. in cleanup_and_exit, if l->obfd is NULL, rmdir is called
(however l->name is a file, which leads to an ENOTDIR and the file is not
removed)
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31191] New: objcopy leaves temporary files (and directories) in case of error,
mooodyhunter at outlook dot com <=