[LLVMbugs] [Bug 5835] New: tailcallopt produces non-PIC relocation on linux.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Dec 18 17:06:56 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5835
Summary: tailcallopt produces non-PIC relocation on linux.
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jyasskin at google.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=3961)
--> (http://llvm.org/bugs/attachment.cgi?id=3961)
Sample .ll file
$ llvm-as mandelbrot.ll
$ llc -tailcallopt -relocation-model=pic mandelbrot.bc -o mandelbrot.s
$ gcc mandelbrot.s -o mandelbrot.so -fPIC -shared -fno-strict-aliasing
/usr/bin/ld: /tmp/cctwYEcT.o: relocation R_X86_64_PC32 against `pixel' 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
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
$ /usr/bin/ld -v
GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103
It works without -tailcallopt:
$ llc -relocation-model=pic mandelbrot.bc -o mandelbrot.s
$ gcc mandelbrot.s -o mandelbrot.so -fPIC -shared -fno-strict-aliasing
$
--
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