3 ms·
> the Linux version of strings is an integral part of GNU binutils... I think almost everyone ships that version of strings and objdump, fwiw. FreeBSD and NetB
by _delirium 12y ago
> the Linux version of strings is an integral part of GNU binutils...
I think almost everyone ships that version of strings and objdump, fwiw. FreeBSD and NetBSD ship an almost verbatim GNU binutils; OpenBSD's seems to have more local changes (partly b/c it's based on an older binutils they've diverged from), but its 'strings' still uses libbfd.
The only exception I ran across in some quick digging is that Illumos ships the Solaris version of 'strings', and doesn't ship an 'objdump'. This 'strings' seems to have come via Sun via Microsoft via AT&T via UC Berkeley: https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/strings/strings.c https://github.com/illumos/illumos-gate/blob/master/usr/src/.... Whether it's safer I haven't investigated; it also parses ELF files, but via its own libelf rather than GNU libbfd.
- saurik 12y agoApple also does not ship this tool from binutils (though as they aren't dealing with ELF this may be out of the scope of your analysis). They have used their own version of strings which also descended from BSD (like the one you point to from Illumos), though more indirectly (they used some of BSD's code, but I think mostly rewrote it while they were NeXT).
- edwintorok 12y agoOpenBSD's strings outputs this: BFD: strings-bfd-badptr: invalid string offset 1179403647 >= 0 for section `'