gold and -flto always fails with an internal error on arm-linux-gnueabi*

Bug #1191909 reported by Matthias Klose
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Binutils
Fix Released
Medium
Kugan Vivekanandarajah
binutils
Confirmed
Medium
binutils (Debian)
Fix Released
Unknown
binutils (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned

Bug Description

seen with gcc-4.7 and binutils 2.22, and 4.8 and binutils trunk,

$ echo "int main() {return 0;}" >a.c
$ gcc -fuse-ld=gold -flto a.c
/usr/bin/ld.gold: internal error in do_read_symbols, at ../../gold/arm.cc:6735
collect2: error: ld returned 1 exit status

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

seen with gcc-4.7 and binutils 2.22, and 4.8 and binutils trunk,

$ echo "int main() {return 0;}" >a.c
$ gcc -fuse-ld=gold -flto a.c
/usr/bin/ld.gold: internal error in do_read_symbols, at ../../gold/arm.cc:6735
collect2: error: ld returned 1 exit status

Changed in binutils:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in binutils (Debian):
status: Unknown → Confirmed
Revision history for this message
In , Glibc (glibc) wrote :

Same on the latest gcc/binutils trunk.

Any hope here ?

Changed in binutils-linaro:
assignee: nobody → Kugan Vivekanandarajah (kugan-vivekanandarajah)
Changed in binutils-linaro:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Will Newton (will-newton) wrote :

Upstream fix committed here:

commit f35c4853cc5b0e51d8a460be390f7a20cd44ba44
Author: Cary Coutant <email address hidden>
Date: Mon Jul 7 10:14:45 2014 -0700

    Fix internal error with LTO on ARM.

    This prevents the target-specific do_read_symbols methods from being called
    twice when do_layout_deferred_sections needs to layout an .eh_frame section.

    gold/
        PR gold/15639
        * dynobj.h (Sized_dynobj::base_read_symbols): New method.
        * dynobj.cc (Sized_dynobj::do_read_symbols): Move body to...
        (Sized_dynobj::base_read_symbols): ...new method.
        * object.h (Sized_relobj_file::base_read_symbols): New method.
        * object.cc (Sized_relobj_file::do_read_symbols): Move body to...
        (Sized_relobj_file::base_read_symbols): ...new method.
        * arm.cc (Arm_relobj::do_read_symbols): Call base_read_symbols.
        * mips.cc: (Mips_relobj::do_read_symbols): Likewise.
        * powerpc.cc (Powerpc_dynobj::do_read_symbols): Likewise.

Changed in binutils-linaro:
status: Triaged → Fix Committed
Changed in binutils (Debian):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.24.51.20140709-1ubuntu1

---------------
binutils (2.24.51.20140709-1ubuntu1) utopic; urgency=medium

  * Merge with Debian, remaining changes:
    - Build from upstream sources.

binutils (2.24.51.20140709-1) unstable; urgency=medium

  * Snapshot, taken from the trunk 20140709.
    - Fix PR gold/15639, -flto and ld.gold on ARM.
      Closes: #712189. LP: #1191909.
 -- Matthias Klose <email address hidden> Wed, 09 Jul 2014 20:00:32 +0200

Changed in binutils (Ubuntu):
status: New → Fix Released
Changed in binutils-linaro:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in binutils (Ubuntu Trusty):
status: New → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Matthias, or anyone else affected,

Accepted binutils into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/binutils/2.24-5ubuntu13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in binutils (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Matthias Klose (doko) wrote :

fixed in trusty-proposed

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.24-5ubuntu13

---------------
binutils (2.24-5ubuntu13) trusty-proposed; urgency=medium

  * SRU LP: #1311866.
  * Update from the 2.24 branch, 20141113.
    - Fix PR gold/16945, properly handle 64-bit GOT relocations on x86_64.
    - Fix PR gold/16900, an issue where first reserved word of GOT is not
      initialized if there is no PLT.
    - gold: Fix handling of __ehdr_start when it cannot be defined.
    - Apply mainline patches for ppc476 workaround.
    - Add binutils test cases for AArch64.
    - Disassembler fix on AArch64.
    - Fix PR ld/17047, crash in the bfd linker with MALLOC_PERTURB.
    - Fix PR ld/17277, ARM32, bogus DT_TEXTREL marker (and R_ARM_NONE)
      for PC-relative cross-section relocs.
    - [AArch64] Cortex-A53 erratum 835769 linker workaround.
  * Remove the aarch64-fix-instruction-mask, applied on the branch.
  * Fix PR gold/15639, -flto and ld.gold on ARM. LP: #1191909.
  * Use 64k for COMMONPAGESIZE on PPC. LP: #1412553.
  * Fix PR ld/16452, PR ld/16457, don't output symbol version definitions
    for non-DT_NEEDED. LP: #1248642.
  * Add powerpc target for ppc64el builds. Closes: #760395. LP: #1433238.
  * binutils-doc: Include all info files. LP: #1410780.
  * Fix PR ld/16715 (ARM), set st_value to zero for undefined symbols.
    LP: #1441961.
 -- Matthias Klose <email address hidden> Tue, 14 Apr 2015 19:52:45 +0200

Changed in binutils (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for binutils has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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