Page MenuHomeFreeBSD

strip/objcopy: handle empty file as unknown
ClosedPublic

Authored by emaste on Oct 25 2021, 8:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 12:00 PM
Unknown Object (File)
Wed, Sep 17, 4:08 AM
Unknown Object (File)
Sep 8 2025, 8:09 PM
Unknown Object (File)
Sep 7 2025, 7:48 AM
Unknown Object (File)
Sep 7 2025, 3:14 AM
Unknown Object (File)
Aug 3 2025, 6:32 AM
Unknown Object (File)
Jul 22 2025, 11:02 PM
Unknown Object (File)
Jul 20 2025, 10:14 AM
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