[LLVMbugs] [Bug 4723] New: invalid relocation for PIC emitted in libstdc++ build
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Aug 14 19:19:22 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4723
Summary: invalid relocation for PIC emitted in libstdc++ build
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-g++
AssignedTo: unassignedbugs at nondot.org
ReportedBy: gohman at apple.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=3313)
--> (http://llvm.org/bugs/attachment.cgi?id=3313)
preprocessed C++ source
The llvm-gcc build fails on x86_64-unknown-linux-gnu with this message:
/usr/bin/ld: .libs/bitmap_allocator.o: relocation R_X86_64_PC32 against symbol
`__gxx_personality_v0' can not be used when making a shared object; recompile
with -fPIC
It appears that llvm-g++ is emitting a non-PIC relocation in PIC mode,
in the .eh_frame section. Attached is the preprocessed source for
bitmap_allocator.o. Compiling it with both g++-4.2 and llvm-g++ shows
the difference:
g++-4.2 -fpic -c bitmap_allocator.i && readelf -r bitmap_allocator.o |grep
personality
Relocation section '.rela.data.DW.ref.__gxx_personality_v0' at offset 0x1b998
contains 1 entries:
000000000000 018500000001 R_X86_64_64 0000000000000000
__gxx_personality_v0 + 0
llvm-g++ -fpic -c bitmap_allocator.i && readelf -r bitmap_allocator.o |grep
personality
00000000002b 01b800000002 R_X86_64_PC32 0000000000000000
__gxx_personality_v0 + 0
--
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