nm does not handle binaries compiled with GCC

2 views
Skip to first unread message

Colin Fowler

unread,
Nov 20, 2009, 8:09:36 AM11/20/09
to min...@googlegroups.com
With ACK, nm works fine. with GCC, it produces garbage output.

am I doing something wrong? Even on a simple helloword file nm doesn't work

Colin

Erik van der Kouwe

unread,
Nov 20, 2009, 8:22:56 AM11/20/09
to minix3
Hi,

ACK and GNU use different variations of the a.out binary format, with
different symbol tables. Use ACK tools (like nm) for ACK binaries and
GNU tools (like /usr/gnu/bin/gnm) for GNU binaries.

With kind regards,
Erik

Elethiomel

unread,
Nov 20, 2009, 8:23:01 AM11/20/09
to minix3
NM ;)

It's gnm for GNU nm.

Colin

Colin Fowler

unread,
Nov 20, 2009, 8:31:56 AM11/20/09
to min...@googlegroups.com
Hi Erik,
I need to start getting more sleep. I actually had to read the binutils
Makefile to figure that it. Stupid of me as GNU ar is gar etc.

Colin
> --
>
> You received this message because you are subscribed to the Google Groups "minix3" group.
> To post to this group, send email to min...@googlegroups.com.
> To unsubscribe from this group, send email to minix3+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/minix3?hl=.
>
>

Ben Gras

unread,
Nov 25, 2009, 7:21:15 AM11/25/09
to minix3
Extra note - if you're using nm to find in which function a pc /
stacktrace points to, use the 'unstack' script. It completely decodes
a stacktrace for you (you can copypaste it from /var/log/messages) and
knows the difference between ack and gcc binaries.
Reply all
Reply to author
Forward
0 new messages