[LLVMbugs] [Bug 24286] New: relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 27 17:09:31 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24286
Bug ID: 24286
Summary: relocation R_MIPS_26 against `a local symbol' can not
be used when making a shared object; recompile with
-fPIC
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: MIPS
Assignee: unassignedbugs at nondot.org
Reporter: brooks at freebsd.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14655
--> https://llvm.org/bugs/attachment.cgi?id=14655&action=edit
crtbeginS.c processed by clang
When trying to link FreeBSD's libc compiled for mips64-unknown-freebsd I get
this linker error with ld from binutils 2.25:
/usr/local/mips64-freebsd/bin/ld:
/home/bed22/obj/mips.mips64/home/bed22/git/cheribsd/tmp/usr/lib/crtbeginS.o:
relocation R_MIPS_26 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
/home/bed22/obj/mips.mips64/home/bed22/git/cheribsd/tmp/usr/lib/crtbeginS.o:
error adding symbols: Bad value
Compiler invocation to build crtbegin.o:
/home/bed22/git/llvm-cheri/Build/bin/clang -target mips64-unknown-freebsd
-integrated-as -msoft-float -target mips64-unknown-freebsd11.0
--sysroot=/home/bed22/obj/mips.mips64/home/bed22/git/cheribsd/tmp
-B/usr/local/mips64-freebsd/bin/ -O -pipe -G0 -DIN_GCC -DHAVE_LD_EH_FRAME_HDR
-DDT_CONFIG -D__GLIBC__=3 -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables
-fno-omit-frame-pointer
-I/home/bed22/git/cheribsd/gnu/lib/csu/../../../contrib/gcclibs/include
-I/home/bed22/git/cheribsd/gnu/lib/csu/../../../contrib/gcc/config
-I/home/bed22/git/cheribsd/gnu/lib/csu/../../../contrib/gcc -I.
-I/home/bed22/git/cheribsd/gnu/lib/csu/../../usr.bin/cc/cc_tools -std=gnu89
-Qunused-arguments -g0 -DCRT_BEGIN -DCRTSTUFFS_O -DSHARED -fpic -c -o
crtbeginS.o
/home/bed22/git/cheribsd/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
This actual compiler is fairly heavily modified, but merged with trunk as of a
few weeks ago. I've found the same problems with trunk, but trunk suffers from
all the issues referenced in 23370 which prevent me from getting far enough to
get this error.
objdump -r output from crtbeginS.o:
--<cut>--
/home/bed22/obj/mips.mips64/home/bed22/git/cheribsd/tmp/usr/lib/crtbeginS.o:
file
format elf64-tradbigmips-freebsd
RELOCATION RECORDS FOR [.text]:
[51/1943]
OFFSET TYPE VALUE
000000000000001c R_MIPS_GPREL16 __do_global_dtors_aux
000000000000001c R_MIPS_SUB *ABS*
000000000000001c R_MIPS_HI16 *ABS*
0000000000000024 R_MIPS_GPREL16 __do_global_dtors_aux
0000000000000024 R_MIPS_SUB *ABS*
0000000000000024 R_MIPS_LO16 *ABS*
0000000000000028 R_MIPS_GOT_PAGE __do_global_dtors_aux.completed
0000000000000028 R_MIPS_NONE *ABS*
0000000000000028 R_MIPS_NONE *ABS*
000000000000002c R_MIPS_GOT_OFST __do_global_dtors_aux.completed
000000000000002c R_MIPS_NONE *ABS*
000000000000002c R_MIPS_NONE *ABS*
0000000000000038 R_MIPS_GOT_DISP __cxa_finalize
0000000000000038 R_MIPS_NONE *ABS*
0000000000000038 R_MIPS_NONE *ABS*
0000000000000044 R_MIPS_GOT_DISP __dso_handle
0000000000000044 R_MIPS_NONE *ABS*
0000000000000044 R_MIPS_NONE *ABS*
0000000000000048 R_MIPS_CALL16 __cxa_finalize
0000000000000048 R_MIPS_NONE *ABS*
0000000000000048 R_MIPS_NONE *ABS*
0000000000000054 R_MIPS_GOT_PAGE __do_global_dtors_aux.p
0000000000000054 R_MIPS_NONE *ABS*
0000000000000054 R_MIPS_NONE *ABS*
0000000000000058 R_MIPS_GOT_OFST __do_global_dtors_aux.p
0000000000000058 R_MIPS_NONE *ABS*
0000000000000058 R_MIPS_NONE *ABS*
0000000000000070 R_MIPS_GOT_OFST __do_global_dtors_aux.p
0000000000000070 R_MIPS_NONE *ABS*
0000000000000070 R_MIPS_NONE *ABS*
0000000000000074 R_MIPS_GOT_OFST __do_global_dtors_aux.p
0000000000000074 R_MIPS_NONE *ABS*
0000000000000074 R_MIPS_NONE *ABS*
0000000000000088 R_MIPS_GOT_OFST __do_global_dtors_aux.completed
0000000000000088 R_MIPS_NONE *ABS*
0000000000000088 R_MIPS_NONE *ABS*
00000000000000c0 R_MIPS_GPREL16 frame_dummy
00000000000000c0 R_MIPS_SUB *ABS*
00000000000000c0 R_MIPS_HI16 *ABS*
00000000000000c8 R_MIPS_GPREL16 frame_dummy
00000000000000c8 R_MIPS_SUB *ABS*
00000000000000c8 R_MIPS_LO16 *ABS*
00000000000000cc R_MIPS_GOT_PAGE __JCR_LIST__
00000000000000cc R_MIPS_NONE *ABS*
00000000000000cc R_MIPS_NONE *ABS*
00000000000000d0 R_MIPS_GOT_OFST __JCR_LIST__
00000000000000d0 R_MIPS_NONE *ABS*
00000000000000d0 R_MIPS_NONE *ABS*
00000000000000dc R_MIPS_GOT_DISP _Jv_RegisterClasses
00000000000000dc R_MIPS_NONE *ABS*
00000000000000dc R_MIPS_NONE *ABS*
00000000000000ec R_MIPS_GOT_OFST __JCR_LIST__
00000000000000ec R_MIPS_NONE *ABS*
00000000000000ec R_MIPS_NONE *ABS*
RELOCATION RECORDS FOR [.fini]:
OFFSET TYPE VALUE
0000000000000008 R_MIPS_26 .text
0000000000000008 R_MIPS_NONE *ABS*
0000000000000008 R_MIPS_NONE *ABS*
RELOCATION RECORDS FOR [.init]:
OFFSET TYPE VALUE
0000000000000008 R_MIPS_26 .text+0x00000000000000b0
0000000000000008 R_MIPS_NONE *ABS*+0x00000000000000b0
0000000000000008 R_MIPS_NONE *ABS*+0x00000000000000b0
RELOCATION RECORDS FOR [.pdr]:
OFFSET TYPE VALUE
0000000000000000 R_MIPS_32 .text
0000000000000000 R_MIPS_NONE *ABS*
0000000000000000 R_MIPS_NONE *ABS*
0000000000000020 R_MIPS_32 .text+0x00000000000000b0
0000000000000020 R_MIPS_NONE *ABS*+0x00000000000000b0
0000000000000020 R_MIPS_NONE *ABS*+0x00000000000000b0
RELOCATION RECORDS FOR [.sdata]:
OFFSET TYPE VALUE
0000000000000000 R_MIPS_64 __dso_handle
0000000000000000 R_MIPS_NONE *ABS*
0000000000000000 R_MIPS_NONE *ABS*
RELOCATION RECORDS FOR [.data.rel.local]:
OFFSET TYPE VALUE
0000000000000000 R_MIPS_64 .dtors+0x0000000000000008
0000000000000000 R_MIPS_NONE *ABS*+0x0000000000000008
0000000000000000 R_MIPS_NONE *ABS*+0x0000000000000008
--<cut>--
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150728/63ff3128/attachment.html>
More information about the llvm-bugs
mailing list