Yes, the '@' etc in the symbol names are part of the name-mangling scheme.
It allows type-safe linkage, since you get different decoration of the
name depending on parameter count and types, returned data type and
calling model.
Note that different compilers might use different name mangling schemes,
making it impossible to cross-link modules compiled by different
compilers.
/Per W
On Sun, 7 Sep 2003, [ISO-8859-2] OROSZI Bal=E1zs wrote:
> Tony M. wrote:
> > This is "name mangling", and it allows for function overloading.
> >
> > OROSZI Bal=E1zs wrote:
> >
> >> Hi!
> >>
> >> I saw in some DLLs and .def files, that there is an @ symbol at the
> >> end of funtion names, then there is a number after it. I ask, what are
> >> they for? Why are there these numbers? What purpose do they serve?
>
> No, that is not name mangling. Name mangling does waaaay much more (and
> different) than just that @ symbol :)
>
> But I have found it on the Net after some hard searching (yeah, try to
> search for @ :/ anyway. That @ symbol is used to specify a number after
> it. This number represents the number of bytes that the linker reserves
> in the stack for arguments passed to the function.
> For example: MyFunc(int) would become MyFunc@4
> The compiler reserves 4 bytes for arguments.
> The compiler also uses this number and the "@" sign as part of the
> function names.
>
> Thanks for your answer btw, at least I know there are people here who
> want to help others, and answer really fast. Thanks again.
>
> --
> Greetings,
> Bal=E1zs
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|