[LLVMbugs] [Bug 19634] New: /tmp/hello-b5f912.o:(.text+0x2a): relocation truncated to fit: R_X86_64_32 against `.rdata'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 2 06:46:26 PDT 2014


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

            Bug ID: 19634
           Summary: /tmp/hello-b5f912.o:(.text+0x2a): relocation truncated
                    to fit: R_X86_64_32 against `.rdata'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zosrothko at orange.fr
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Hi

On a Win7/x86_64/Cygwin64 platform, compiling a simple hello.c with clang
aborts at link time with this error 

/tmp/hello-b5f912.o:(.text+0x2a): relocation truncated to fit: R_X86_64_32
against `.rdata'

$ cat hello.c
#include <stdio.h>

int main(int argc, char** argv) {
        printf("Hello World!\n");
        return  0;
}

$ clang -o hello -v hello.c
clang version 3.5.0 (trunk 207834)
Target: x86_64-unknown-windows-cygnus
Thread model: posix
 "/usr/local/bin/clang" -cc1 -triple x86_64-unknown-windows-cygnus -emit-obj
-mrelax-all -disable-free -main-file-name hello.c -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.23.52.20130604 -v
-resource-dir /usr/local/bin/../lib/clang/3.5.0 -fdebug-compilation-dir
/home/FrancisANDRE -ferror-limit 19 -fmessage-length 115 -mstackrealign
-fno-use-cxa-atexit -fobjc-runtime=gcc -fdiagnostics-show-option -o
/tmp/hello-2c5cb7.o -x c hello.c
clang -cc1 version 3.5.0 based upon LLVM 3.5.0svn default target
x86_64-unknown-windows-cygnus
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/bin/../lib/clang/3.5.0/include
 /usr/include/w32api
 /usr/include
End of search list.
 "/usr/bin/gcc" -v -m64 -o hello /tmp/hello-2c5cb7.o
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with:
/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2/configure
--srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
--sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --enable-shared
--enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs
--enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-tune=generic
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm
--enable-libquadmath --enable-libquadmath-support --enable-libssp
--enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers
--with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib --libexecdir=/usr/lib
Thread model: posix
gcc version 4.8.2 (GCC)
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/:/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/:/usr/lib/gcc/x86_64-pc-cygwin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/:/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-m64' '-o' 'hello.exe' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/collect2.exe -m i386pep --wrap _Znwm
--wrap _Znam --wrap _ZdlPv --wrap _ZdaPv --wrap _ZnwmRKSt9nothrow_t --wrap
_ZnamRKSt9nothrow_t --wrap _ZdlPvRKSt9nothrow_t --wrap _ZdaPvRKSt9nothrow_t
-Bdynamic --dll-search-prefix=cyg --tsaware -o hello.exe
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib/crt0.o
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/crtbegin.o
-L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2
-L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../..
/tmp/hello-2c5cb7.o -lgcc_s -lgcc -lcygwin -ladvapi32 -lshell32 -luser32
-lkernel32 -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/crtend.o
/tmp/hello-2c5cb7.o:(.text+0x2a): relocation truncated to fit: R_X86_64_32
against `.rdata'
collect2: error: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see
invocation)

-- 
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/20140502/a035aac3/attachment.html>


More information about the llvm-bugs mailing list