[Toybox] Still poking at shell corner cases...

enh enh at google.com
Tue Jul 2 10:17:22 PDT 2019


On Tue, Jul 2, 2019 at 12:35 AM Rob Landley <rob at landley.net> wrote:
>
> On 7/1/19 4:06 PM, enh wrote:
> >> Not _all_ the hard parts, but some of them. (And I still want to support 32 bit,
> >> embedded systems still use it...)
> >
> > supporting 32-bit from a 32-bit binary is fine, and supporting 64-bit
> > from a 64-bit binary is fine, but supporting the other bitness than
> > your strace binary is a nightmare if you actually want to decode
> > anything (and if you don't, you're basically useless anyway). most of
> > the bulk of the existing strace goes into dealing with this.
>
> strace64 can exec strace32 if /proc/$PID/exe has a 32 bit ELF signature.

that's a good point. still a bit awkward to build with the toybox
build, though, so still something i'm hoping to see the back of within
the next few years.

> If you "ln -s /path/to/32bit/toybox /blah/strace" and then "ln -s /blah/strace
> /bin/strace32" toybox knows how to do one level of readlink() to see if the name
> turns into something it recognizes. :)
>
> Putting a usable strac32 in the $PATH is of course left as an exercise for the
> reader. But if the system can run 32 bit binaries, it can run a 32 bit strace
> binary, and the 64 bit strace binary can hand off.
>
> Rob



More information about the Toybox mailing list