\1 Mangled Names

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?

What target triples are they expected on?

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