[Toybox] readelf questions.

Rob Landley rob at landley.net
Tue Jan 28 19:16:21 PST 2020


Is reading 64 bit binaries from 32 bit systems interesting? Because struct sh
and struct ph have "int" and "long" values, which are the same on 32 bit.
(long long is the one that's always 64 bit.)

Last elf plumbing I did (file?) I carefully made sure every access wouldn't go
off the end of the mmap. This doesn't seem to ever check that? (ph.filesz could
be zero then you're feeding -1 to printf, etc...)

Should work on non-pathological ELF files, of course... :)

Rob


More information about the Toybox mailing list