[LLVMbugs] [Bug 6535] New: "relocation R_X86_64_PC32 against undefined symbol" building C++ shared libraries

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 7 10:56:07 PST 2010


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

           Summary: "relocation R_X86_64_PC32 against undefined symbol"
                    building C++ shared libraries
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sorokin at rain.ifmo.ru
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4418)
 --> (http://llvm.org/bugs/attachment.cgi?id=4418)
fmt.cpp

clang++ -o fmt.o -c -fvisibility-inlines-hidden -fvisibility=hidden -O3 -fPIC
fmt.cpp
clang++ -o libmrt.so -shared fmt.o -lexpat -lz

/usr/bin/ld: fmt.o: relocation R_X86_64_PC32 against undefined symbol `vtable
for std::exception@@GLIBCXX_3.4' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see invocation)

g++ works without error

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