[llvm-bugs] [Bug 36798] New: [PPC64] V2 ABI: relocation R_PPC64_ADDR16_DS out of range when linking against c-runtime
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 19 08:03:24 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36798
Bug ID: 36798
Summary: [PPC64] V2 ABI: relocation R_PPC64_ADDR16_DS out of
range when linking against c-runtime
Product: lld
Version: unspecified
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: sfertile at ca.ibm.com
CC: llvm-bugs at lists.llvm.org
*** Note that testing was done with https://reviews.llvm.org/D44483 and an
experimental fix for https://bugs.llvm.org/show_bug.cgi?id=36755. The first
patch is needed to add support for the PPC64LE target as well as add the
missing .TOC. symbol.
When linking against the C runtime, a relocation in _start is out of range.
min_main.c:
int main(void) {
return 55;
}
I got the verbose link command with:
~/install/LLD/bin/clang -fuse-ld=/home/sfertile/install/LLD/bin/ld.lld -v
min_main.c
"/home/sfertile/install/LLD/bin/ld.lld" \
-z relro --hash-style=gnu --eh-frame-hdr \
-m elf64lppc \
-dynamic-linker /lib64/ld64.so.2 \
-o a.out \
/usr/lib/powerpc64le-linux-gnu/crt1.o \
/usr/lib/powerpc64le-linux-gnu/crti.o \
/home/llvm/gcc/7.3.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.3.0/crtbegin.o \
-L/home/llvm/gcc/7.3.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.3.0 \
-L/home/llvm/gcc/7.3.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.3.0/../../../../lib64
\
-L/lib/powerpc64le-linux-gnu \
-L/lib/../lib64 \
-L/usr/lib/powerpc64le-linux-gnu \
-L/home/llvm/gcc/7.3.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.3.0/../../.. \
-L/home/sfertile/install/LLD/bin/../lib \
-L/lib \
-L/usr/lib \
`pwd`/min_main.o \
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed \
/home/llvm/gcc/7.3.0/lib/gcc/powerpc64le-unknown-linux-gnu/7.3.0/crtend.o \
/usr/lib/powerpc64le-linux-gnu/crtn.o
error: /usr/lib/powerpc64le-linux-gnu/crt1.o:(function _start): relocation
R_PPC64_ADDR16_DS out of range: -98664 is not in [-32768, 32767]
--
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/20180319/34770922/attachment.html>
More information about the llvm-bugs
mailing list