GCC supports a
#pragma directive that changes the name used in
assembly for a given declaration. While this pragma is supported on all
platforms, it is intended primarily to provide compatibility with the
Solaris system headers. This effect can also be achieved using the asm
labels extension (see Controlling Names Used in Assembler Code).
redefine_extname oldname newname¶
This pragma gives the C function oldname the assembly symbol
newname. The preprocessor macro
is defined if this pragma is available (currently on all platforms).
This pragma and the
asm labels extension interact in a complicated
manner. Here are some corner cases you may want to be aware of:
asmlabel feature does not have this restriction.
asmlabels do not have this restriction.
#pragma redefine_extnameis always the C-language name.