AFAIK, a shared object could be a PIE program if it has a (valid) interpretor header (PT_INTERP).
It should be noted that glibc's ELF loader (ld-linux.so, exact name depending on architecture) is a shared object and a valid program, but doesn't have an interpretor header, but that's the only exception I aware of.
IOTH, glibc's libc.so is a shared object with a valid interpretor, making it a valid program (try it !). Reporting such library as a program might be misleading for end user.
Anyway, PT_INTERP header not at a fixed location in the ELF file, so it cannot be described in shared-mime-info database.
(It's a pity PIE ELF files were not describe with a new ELF type or at least a flag :(
AFAIK, a shared object could be a PIE program if it has a (valid) interpretor header (PT_INTERP).
It should be noted that glibc's ELF loader (ld-linux.so, exact name depending on architecture) is a shared object and a valid program, but doesn't have an interpretor header, but that's the only exception I aware of.
IOTH, glibc's libc.so is a shared object with a valid interpretor, making it a valid program (try it !). Reporting such library as a program might be misleading for end user.
Anyway, PT_INTERP header not at a fixed location in the ELF file, so it cannot be described in shared-mime-info database.
(It's a pity PIE ELF files were not describe with a new ELF type or at least a flag :(