* question on getting mangled names using 'nm'
@ 1995-12-04 5:00 Scott Moody, 773-8600
1995-12-06 5:00 ` Tim Lucia
1995-12-10 5:00 ` Alan H. Martin
0 siblings, 2 replies; 3+ messages in thread
From: Scott Moody, 773-8600 @ 1995-12-04 5:00 UTC (permalink / raw)
I am using the DEC-Alpha C++ compiler and need to connect the code
to other non c++ tools, such as C and Ada. Unfortunately
I don't know the name of the externals in the C++ code, and my
use of the unix 'nm' tool isn't helping. It seems to print a pretty
name instead of the mangled name.
eg. extern a_proc()
_> nm outputs: a_proc(void) instead of something like a_proc_F ??
Anyone know the answer on OSF-1?? This same process has worked
with Gnu-C++ on Sun and Solaris, and the Sun C++ compiler on Solaris.
Thanks.
scott moody
Boeing
206-773-6800
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question on getting mangled names using 'nm'
1995-12-04 5:00 question on getting mangled names using 'nm' Scott Moody, 773-8600
@ 1995-12-06 5:00 ` Tim Lucia
1995-12-10 5:00 ` Alan H. Martin
1 sibling, 0 replies; 3+ messages in thread
From: Tim Lucia @ 1995-12-06 5:00 UTC (permalink / raw)
stdump(1) stdump(1)
NAME
stdump - dump portions of a file containing symbolic information
SYNOPSIS
stdump file
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question on getting mangled names using 'nm'
1995-12-04 5:00 question on getting mangled names using 'nm' Scott Moody, 773-8600
1995-12-06 5:00 ` Tim Lucia
@ 1995-12-10 5:00 ` Alan H. Martin
1 sibling, 0 replies; 3+ messages in thread
From: Alan H. Martin @ 1995-12-10 5:00 UTC (permalink / raw)
In article <DJ2rJ7.8H4@plato.ds.boeing.com> scott@hakuin.boeing.com writes:
>I am using the DEC-Alpha C++ compiler and need to connect the code
>to other non c++ tools, such as C and Ada. Unfortunately
>I don't know the name of the externals in the C++ code, ...
On any platform, if you want a C++ routine named a_proc to be callable from
other languages like C, then unless you need function overloading or want
type-safe linkage, don't declare it like this:
a_proc() { ... }
declare it using a linkage specification like this:
extern "C" a_proc() { ... }
-or-
extern "C" {
a_proc() { ... }
}
>... and my use of the unix 'nm' tool isn't helping. It seems to print a
>pretty name instead of the mangled name.
If you want nm to print C++ mangled names, feed it one of the switches
-mangled_name_only or -mangled_name_also.
/AHM
--
Alan Howard Martin AMartin@TLE.ENet.DEC.Com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-12-10 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-12-04 5:00 question on getting mangled names using 'nm' Scott Moody, 773-8600
1995-12-06 5:00 ` Tim Lucia
1995-12-10 5:00 ` Alan H. Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox