[Toybox] [PATCH] Improve file(1)'s ELF support.

Rob Landley rob at landley.net
Sun Jul 3 20:16:09 PDT 2016


On 07/02/2016 03:01 PM, enh wrote:
> Read any PT_NOTE sections to look for NT_GNU_BUILD_ID or Android API
> level notes. I deliberately didn't NT_GNU_ABI_TAG because it's noisy --
> every Linux executable has one -- but not something most command-line
> users will have any use for. (And you can ask readelf(1) anyway.)
> 
> Also read the section headers to implement "stripped"/"not stripped".
> 
> This patch removes "uses %d libs" because it was actually just counting
> dynamic sections in the ELF file, and there are only 0 or 1 of those in
> a valid ELF flie. (If you really want this functionality, you have to
> *parse* the dynamic section looking for the DT_NEEDED entries. But that's
> more of a job for readelf(1) than file(1).)

Applied and promoted to toys/posix.

Thanks,

Rob



More information about the Toybox mailing list