Page MenuHomeFreeBSD

strip/objcopy: handle empty file as unknown
ClosedPublic

Authored by emaste on Oct 25 2021, 8:10 PM.
Tags
None
Referenced Files
F137709392: D32648.diff
Tue, Nov 25, 2:20 AM
Unknown Object (File)
Mon, Nov 24, 9:32 AM
Unknown Object (File)
Tue, Nov 11, 10:41 PM
Unknown Object (File)
Mon, Nov 3, 2:27 AM
Unknown Object (File)
Tue, Oct 28, 11:23 AM
Unknown Object (File)
Oct 25 2025, 3:18 PM
Unknown Object (File)
Oct 23 2025, 5:12 AM
Unknown Object (File)
Oct 14 2025, 12:00 PM
Subscribers

Details

Summary

Previously strip reported a somewhat cryptic strip: elf_begin() failed: Invalid argument for an empty file. Instead handle it as we do with an unknown file format.

LLVM reports error: 'file': The file was not recognized as a valid object file for both empty and unknown files. GNU strip produces no output for empty files.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable