libffi build failure with ld.gold (works with trunk 20110106, fails with 20110110)

Bug #701110 reported by Matthias Klose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc
Confirmed
Medium
gcc-snapshot (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gcc-snapshot

this is a build enabled to build Go, and pulling in libffi, which fails with

libtool: link: /scratch/packages/gcc/4.6/gcc-4.6-4.6-20110110/build/./gcc/xgcc
-B/scratch/packages/gcc/4.6/gcc-4.6-4.6-20110110/build/./gc
c/ -B/usr/i686-linux-gnu/bin/ -B/usr/i686-linux-gnu/lib/ -isystem
/usr/i686-linux-gnu/include -isystem /usr/i686-linux-gnu/sys-include
-shared src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o
src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o
src/x86/.libs/ffi.o src/x86/.libs/sysv.o -Wl,-soname -Wl,libffi.so.4 -o
.libs/libffi.so.4.0.1
ld.gold: internal error in set_offset, at ../../gold/output.cc:4030
collect2: ld returned 1 exit status
make[6]: *** [libffi.la] Error 1

I didn't change the build environment between the two builds. gcc was
configured with

         --enable-languages=c,c++,fortran,objc,obj-c++,go
         --prefix=/usr
         --program-suffix=-4.6
         --enable-shared
         --with-system-zlib
         --without-included-gettext
         --enable-threads=posix
         --enable-nls
         --enable-clocale=gnu
         --enable-libstdcxx-debug
         --enable-libstdcxx-time=yes
         --enable-plugin
         --enable-gold
         --enable-ld=default
         --with-plugin-ld=ld.gold
         --enable-objc-gc
         --enable-targets=all
         --with-arch-32=i686
         --with-tune=generic
         --enable-checking=release
         --build=i686-linux-gnu
         --host=i686-linux-gnu
         --target=i686-linux-gnu

Revision history for this message
Matthias Klose (doko) wrote :

Binary package hint: gcc-snapshot

this is a build enabled to build Go, and pulling in libffi, which fails with

libtool: link: /scratch/packages/gcc/4.6/gcc-4.6-4.6-20110110/build/./gcc/xgcc
-B/scratch/packages/gcc/4.6/gcc-4.6-4.6-20110110/build/./gc
c/ -B/usr/i686-linux-gnu/bin/ -B/usr/i686-linux-gnu/lib/ -isystem
/usr/i686-linux-gnu/include -isystem /usr/i686-linux-gnu/sys-include
-shared src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o
src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o
src/x86/.libs/ffi.o src/x86/.libs/sysv.o -Wl,-soname -Wl,libffi.so.4 -o
.libs/libffi.so.4.0.1
ld.gold: internal error in set_offset, at ../../gold/output.cc:4030
collect2: ld returned 1 exit status
make[6]: *** [libffi.la] Error 1

I didn't change the build environment between the two builds. gcc was
configured with

         --enable-languages=c,c++,fortran,objc,obj-c++,go
         --prefix=/usr
         --program-suffix=-4.6
         --enable-shared
         --with-system-zlib
         --without-included-gettext
         --enable-threads=posix
         --enable-nls
         --enable-clocale=gnu
         --enable-libstdcxx-debug
         --enable-libstdcxx-time=yes
         --enable-plugin
         --enable-gold
         --enable-ld=default
         --with-plugin-ld=ld.gold
         --enable-objc-gc
         --enable-targets=all
         --with-arch-32=i686
         --with-tune=generic
         --enable-checking=release
         --build=i686-linux-gnu
         --host=i686-linux-gnu
         --target=i686-linux-gnu

Revision history for this message
Matthias Klose (doko) wrote :

ld.gold from binutils 2.21 was used

Revision history for this message
In , Matthias Klose (doko) wrote :
Revision history for this message
In , Ian Lance Taylor (ianlancetaylor) wrote :

This problem is occurring because the file sysv.o has a writable .eh_frame section. That is confusing gold's relro support. This is certainly a bug in gold. However, there does also seem to be a problem in libffi. Why is the libffi configure.ac setting EH_FRAME_FLAGS to "aw"?

As far as I can see, the test in libffi/configure.ac is bogus. It is compiling code and looking for the setting of the .eh_frame section. However, the code it is compiling has no need to handle exceptions and therefore has no .eh_frame section. The configure script draws the wrong conclusion and emits a writable .eh_frame section when it should emit a readable one. This should be fixed independently of the gold problem.

Revision history for this message
In , Ian Lance Taylor (ianlancetaylor) wrote :

I've committed the fix to gold to both binutils mainline and the binutils 2.21 branch.

http://sourceware.org/ml/binutils/2011-01/msg00142.html

Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :

The assembler files should really be using cfi directives like m68k/sysv.S.

Changed in gcc:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

closing obsolete issue

Revision history for this message
Matthias Klose (doko) wrote :

closing ancient issue

Changed in gcc-snapshot (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.