This bug is a spin-off from https://bugzilla.redhat.com/show_bug.cgi?id=1608549 . In https://bugzilla.redhat.com/show_bug.cgi?id=1608549#c20 , Mark Wielaard wrote: "Then file does keep giving us trouble when used as "ELF file identifier", file could be fixed, but I think rpm should stop relying on file and just have its own small specific ELF file id utility. I could write that and update the rpm scripts to use that instead of trying to regex match file output." So, this is a bug for that specific task, I'll assign it to Mark.
Actually... we already have a small, ELF-specific tool in rpm: elfdeps. The one in released rpm's wont work, but after this patch it should be usable for the purpose: https://github.com/rpm-software-management/rpm/commit/4cc32dec579afbc4aa48de62ee125f532bf3fc94
After actually looking at what find-debuginfo.sh does with file... it needs quite a bit of adaptation to work with the above elfdeps change, or we need to further change elfdeps to be more like file, eg add an option that prints out the filename if a file is actually ELF, or something like that.
Reassigning to debugedit which is where future developments in this area will take place.