This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: c++ symbol name
- From: Martin Stecklum <martini_stecklum at gmx dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 28 Mar 2005 01:35:29 +0200
- Subject: Re: c++ symbol name
Hello again,
Murphy's law! As soon as you write to a mailing list you find the answer
yourself :)
If anyone is interested in the solution:
int test() __asm__ ("_new_symbol_name");
int test()
{
//do something
return 0;
}
And the result in the object file:
Symbol table '.symtab' contains 8 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 FILE LOCAL DEFAULT ABS test.cpp
2: 00000000 0 SECTION LOCAL DEFAULT 1
3: 00000000 0 SECTION LOCAL DEFAULT 2
4: 00000000 0 SECTION LOCAL DEFAULT 3
5: 00000000 0 SECTION LOCAL DEFAULT 4
6: 00000000 0 SECTION LOCAL DEFAULT 5
7: 00000000 10 FUNC GLOBAL DEFAULT 1 _new_symbol_name
Bye
Martin Stecklum