[Toybox] [PATCH] Implement readelf(1).

Rob Landley rob at landley.net
Thu Jan 9 18:48:27 PST 2020


On 1/9/20 12:55 AM, enh wrote:
>> I maintained my own tinycc fork for 3 years (https://landley.net/code/tinycc and
>> http://landley.net/hg/qcc/file/tip/todo/TODO.old) because I wanted to turn it
>> into a multiplexed command that had cc, ld, nm, strip, and so on. (see
>> https://elinux.org/CELF_Project_Proposal/Combine_tcg_with_tcc and
>> http://landley.net/hg/qcc/file/tip/todo/commands.txt)
> 
> i see nm is on that list, so maybe -- even though i greatly prefer
> readelf -- i should make the readelf parser support nm too...

Lotsa build stuff uses nm. (And scripts/bloatcheck parses nm --size-sort output.)

>> Applied. I'll try to review for promotion when I get a chance, but I'm always
>> busy in Japan...
> 
> meh, don't worry about it... readelf isn't used in the AOSP build, and
> i'm happy with folks using it out of pending/ for interactive dicking
> around. (whereas if you're happy to let getopt(1) depend on
> getopt(3)/getopt_long(3)... :-) )

I gotta do a getopts for toysh anyway so that's in that bucket, but I don't get
to most of the builtins until I get the base infrastructure working and I'm 3/8
of the way through variable resolution.

toysh status: I've implemented token parsing, flow control, and input
continuations (so it knows when to prompt > vs $ and when to try to run stuff),
pipes, redirection (including {abc}<>(program) but not yet >/dev/udp/host/port),
and am grinding my way through variable expansion.

I'd guess I'm somewhere between 1/3 and 1/2 of the way through implementing a
proper 0BSD licensed bash replacement shell. (It still doesn't do "echo $PWD"
yet so still not actually _useful_, but working on it.)

>> Rob

Rob



More information about the Toybox mailing list