[Toybox] [PATCH] Distinguish 32- and 64-bit variants in file(1) for x32.

Rich Felker dalias at libc.org
Sun Feb 21 13:39:05 PST 2016


On Sat, Feb 20, 2016 at 02:28:22PM -0600, Rob Landley wrote:
> On Wed, Feb 17, 2016 at 7:02 PM, enh <enh at google.com> wrote:
> > On Wed, Feb 17, 2016 at 3:32 PM, Rob Landley <rob at landley.net> wrote:
> >> On Wed, Feb 17, 2016 at 10:22 AM, enh <enh at google.com> wrote:
> >>> It's necessary to distinguish x86 and x86-64 to be able to recognize the
> >>> way x32 is encoded in ELF.
> >>
> >> Hmmm. That's not fun.
> >>
> >> I note that I spent the morning teaching the code to read/display the
> >> dynamic linker name, so this patch won't "git am" directly.
> >>
> >> Reading the patch, we're pretending that arrch64 has nothing to do
> >> with arm? No mention of arm in this architecture? Ok... (I guess
> >> Cortex-M isn't arm either, but don't currently have an example binary
> >> of that to test.)
> >
> > well, you're the one who removed my original "ARM aarch64" which is
> > what the regular desktop file(1) says :-P
> 
> But not what the linux-kernel developers ever seem to say in their
> patch submissions.

Regardless of what you think about these naming choices, IMO there's
little value in a file(1) that does not print the names that scripts
using it expect to see. The choice to use aarch64 instead of arm64 is
in some ways also a consequence of this, or rather an intentional
_mismatch_ with patterns that should not match. The fact that mips64
and powerpc64 match mips* and powerpc* was historically very
problematic.

Rich

 1456090745.0


More information about the Toybox mailing list