[LLVMbugs] [Bug 12554] New: builtin symbols cannot be renamed using __asm() contrary to gcc

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 13 23:17:21 PDT 2012


             Bug #: 12554
           Summary: builtin symbols cannot be renamed using __asm()
                    contrary to gcc
           Product: clang
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: s at pahtak.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

GCC allows renaming builtin symbols using __asm() but Clang does not. Minimal
example from glibc's configure script

$ cat conftest.c 
extern char *strstr (const char *, const char *) __asm ("my_strstr");
char *foo (const char *a, const char *b)
  return __builtin_strstr (a, b);

$ clang conftest.c -O3 -S -o -|grep my_strstr

$ /usr/bin/gcc conftest.c -O3 -S -o -|grep my_strstr
        jmp     my_strstr

Supporting this seems necessary to compile glibc.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list