[Bug target/61599] [x86_64] With -mcmodel=medium, extern global arrays without size are not treated conservatively.

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jan 30 20:00:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61599

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2015-01-30
                 CC|                            |hjl.tools at gmail dot com
         Resolution|FIXED                       |---
     Ever confirmed|0                           |1

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Adding -fpic, I got:

/ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/pr61599-1.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -mcmodel=medium
-fdata-sections
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.target/i386/pr61599-2.c -lm -fpic -o
./pr61599-1.exe
/tmp/ccfpoxHY.o: In function `bar':
pr61599-2.c:(.text+0xe): relocation truncated to fit: R_X86_64_PC32 against
symbol `a' defined in LARGE_COMMON section in /tmp/ccKTKST2.o
collect2: error: ld returned 1 exit status
compiler exited with status 1

Reopened, it looks that some sections are not handled correctly.


More information about the Gcc-bugs mailing list