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