This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: nm dying on stripped .so's
On Thu, Jan 12, 2017 at 04:39:01PM -0700, Philip Prindeville wrote:
> > On Jan 12, 2017, at 4:25 PM, Alan Modra <amodra@gmail.com> wrote:
> >
> > On Thu, Jan 12, 2017 at 02:23:43PM -0700, Philip Prindeville wrote:
> >>> On Jan 12, 2017, at 3:11 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> >>> Please try readelf -Ds.
> >>
> >> I tried that: it works, thanks. Attaching the output.
> >>
> >> I’m confused why “readelf” considers the file sound, but “nm” doesn’t. Can “nm” be made a little more forgiving?
> >
> > No. You have an object that has been more than just stripped. Its
> > section headers have been completely removed, probably to hinder you
> > inspecting the file. Complain to whoever gave you the file.
> >
>
> No one is trying to hinder anything, as far as I know.
>
> It’s an embedded environment, as I mentioned, and we have to fit an entire Linux distro onto a 4GB flash for a $39 SOC BOM (aka an off-the-shelf wireless router)… so there’s a lot of pressure to get every file to be as small as possible (as sometimes smaller than really useful, especially when you have to debug a situation).
I see. Well, you have my sympathy but the answer remains the same.
nm and many other binutils won't work without section headers.
nm isn't "dying". It isn't a bug that it doesn't work with your
binaries, and it would be quite difficult to modify to work.
--
Alan Modra
Australia Development Lab, IBM