From: yseeley@leland.Stanford.EDU (Yonik Christopher Seeley) Subject: Re: ALPHA-pl11 available on nic: C++ support Date: Tue, 6 Jul 1993 22:23:36 GMT
In article <C9pyMq.CI@bigcomm.gun.de> ado@bigcomm.gun.de (Christoph Adomeit) writes:
[ c++ kernel stuff deleted ]
>
>Correct me, if I'm wrong, I think C++ has a different symbol encoding e.g.
>for functions and structures.
I think that if any info about struct's are included, it would be for
debugging purposes only. The linker does not need to know anything
about structs. Symbols, however, do have the type info of their formal
params included in them.
For instance:
void foo(int a){}
would produce the symbol _foo under gcc, and _foo__Fi under g++
>So it would be difficult to
>a) search kernel-symbols via nlist() and
Sorry, I don't know about nlist. It may still work if it does it the
right way.
>b) link .o Drivers (if one day there are some commercial ones), because they
>can't find some global symbols.
If the .o files are compiled for linux, then they would know enough to
compile it with g++.
The other option is to use C style linking for something like this. This
can be accomplished with extern "C".
>So, does this C++ compilabilyty effect portability ?
C++ was designed to work close enough with C, that I don't
think so.
- Yonik Seeley
yseeley@cs.stanford.edu