https://sourceware.org/bugzilla/show_bug.cgi?id=19567
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> --- Here is a testcase: [hjl@gnu-tools-1 pr18695]$ cat foo.S .data .space 0x80000000 .comm foo,4 [hjl@gnu-tools-1 pr18695]$ cat main.c #include <stdio.h> extern int foo; int main () { printf ("foo: %d\n", foo); foo = 1; printf ("foo: %d\n", foo); return 0; } [hjl@gnu-tools-1 pr18695]$ make x gcc -B./ -mx32 -fno-lto -c -o foo.o foo.S gcc -B./ -mx32 -fno-lto -g -c -o main.o main.c gcc -B./ -mx32 -fno-lto -o x foo.o main.o /usr/lib/gcc/x86_64-redhat-linux/5.3.1/x32/crtbegin.o: In function `__do_global_dtors_aux': crtstuff.c:(.text+0x72): relocation truncated to fit: R_X86_64_PC32 against `.bss' crtstuff.c:(.text+0x84): relocation truncated to fit: R_X86_64_PC32 against `.bss' main.o: In function `main': /export/home/hjl/bugs/binutils/pr18695/main.c:8:(.text+0x5): relocation truncated to fit: R_X86_64_PC32 against symbol `foo' defined in COMMON section in foo.o /export/home/hjl/bugs/binutils/pr18695/main.c:9:(.text+0x21): relocation truncated to fit: R_X86_64_PC32 against symbol `foo' defined in COMMON section in foo.o /export/home/hjl/bugs/binutils/pr18695/main.c:10:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `foo' defined in COMMON section in foo.o collect2: error: ld returned 1 exit status Makefile:32: recipe for target 'x' failed make: *** [x] Error 1 [hjl@gnu-tools-1 pr18695]$ make y gcc -B./ -mx32 -fno-lto -o y foo.o main.o -fuse-ld=gold [hjl@gnu-tools-1 pr18695]$ ./y Segmentation fault (core dumped) [hjl@gnu-tools-1 pr18695]$ -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils