https://open-watcom.github.io/open-watcom-v2-wikidocs/cguide.html explains #pragma aux default
to specify default symbol name generation. For example:
/* prog.c */
#pragma aux default "__*__"
extern int mysym1;
extern int mysym2(int x);
int mysym3(void) { return mysym2(mysym1); }
Then compile:
$ owcc -c -o prog.obj prog.c
$ wdis prog.obj | grep mysym
0000 __mysym3__:
000A A1 00 00 00 00 mov eax,_mysym1
000F E9 00 00 00 00 jmp __mysym2__
Please note that mysym1
didn't receive the surrounding double underscores, so it was unaffected by #pragma aux default
. How can the default be changed for variables as well?
Please note that #pragma aux mysym1 "__*__"
does work for a single variable, but I want to change the default for all of them.