[LLVMbugs] [Bug 19764] New: relocation truncated to fit: R_X86_64_PC32 against symbol `environ' defined in COMMON section in /usr/lib/crt1.o

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 16 09:18:38 PDT 2014


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

            Bug ID: 19764
           Summary: relocation truncated to fit: R_X86_64_PC32 against
                    symbol `environ' defined in COMMON section in
                    /usr/lib/crt1.o
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: harry.weppner at gmx.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12519
  --> http://llvm.org/bugs/attachment.cgi?id=12519&action=edit
minimal example to illustrate the issue

Hi there,

in an attempt to compile
http://blogs.utexas.edu/jdm4372/2013/01/17/stream-version-5-10-released/ with
clang 3.4 on a FreeBSD 10.0-stable system, the linker fails when using large
arrays and using mcodel=medium. gcc47 and higher compile and link the same
program just fine.

I've attached a minimal example "big_array.c" that fails to link when using -O0
but works with -O1 and higher.

$ clang -O0 -mcmodel=medium big_array.c -o big_array
/usr/lib/crt1.o: In function `_start':
/usr/src/lib/csu/amd64/crt1.c:(.text+0x1f): relocation truncated to fit:
R_X86_64_PC32 against symbol `environ' defined in COMMON section in
/usr/lib/crt1.o
/usr/src/lib/csu/amd64/crt1.c:(.text+0x29): relocation truncated to fit:
R_X86_64_PC32 against symbol `environ' defined in COMMON section in
/usr/lib/crt1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks & cheerio, Harry.

-- 
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/20140516/dedd422f/attachment.html>


More information about the llvm-bugs mailing list