[LLVMbugs] [Bug 13061] New: fatal error with -fPIE -mcmodel=kernel

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 8 14:34:24 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13061

             Bug #: 13061
           Summary: fatal error with -fPIE -mcmodel=kernel
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: OpenBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matthew at dempsky.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat u.c
int a;
int foo() { return a; }

$ clang -c u.c -fPIE -mcmodel=kernel -O2 
fatal error: error in backend: Cannot select: 0x202cce810: i64 =
X86ISD::WrapperRIP 0x202cce110 [ID=5]
  0x202cce110: i64 = TargetGlobalAddress<i32* @a> 0 [TF=5] [ID=4]

$ clang --version
clang version 3.1 (branches/release_31)
Target: amd64-unknown-openbsd5.1
Thread model: posix


At the very least, I think there should be a more graceful error message (e.g.,
GCC prints "sorry, unimplemented: code model kernel not supported in PIC
mode").  Preferably though, I'd like to be able to generate
position-independent kernel code. :)

-- 
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