[LLVMdev] \1 Mangled Names

Charles Davis cdavis5x at gmail.com
Tue Dec 4 21:13:43 PST 2012


On Dec 4, 2012, at 9:49 PM, Meador Inge wrote:

> Hi All,
> 
> I am doing some work to extend the target library information and ran across some function
> names in the old simplify-libcalls pass that are prefixed with \1.  For example:
> 
>  \1__isoc99_scanf
>  \1__isoc99_sscan
>  \1fopen64
>  \1fseeko64
>  \1fstat64
>  \1fstatvfs64
> 
> Where do these \1 names come from?
That's a marker that means "don't mangle this name". It's what clang uses to implement the asm() naming extension, e.g.

FILE *fopen(const char *, const char *) asm("fopen64");

where calls to fopen(3) get redirected to a symbol named fopen64 instead.
> 
> What target triples are they expected on?
These particular names pop up in code compiled against glibc (i.e. on *-linux-gnu and *-kfreebsd-gnu), which uses the extension under certain circumstances (e.g. when large-file support is on).

Chip





More information about the llvm-dev mailing list