[Bug gold/11247] New: Assert failure in arm.cc

2010-02-04 Thread ahartmetz at gmail dot com
I'm using gold to speed up linking on my Beagleboard. Compile jobs run on a
different machine but the linker has to run locally so its speed is important.
When compiling the Qt toolkit (version 4.6.1 with a few patches, shouldn't
matter) ld aborts with an assert failure during the linking of QtWebKit, which
is linked from several hundred object files and requires a lot memory to link.
The compiler used is CodeSourcery's 2009q3-68 version (I've made Icecream cross
compile packages from the binary distribution...)
The error message is:
/usr/bin/ld: internal error in scan_sections_for_stubs, at arm.cc:5656

The first few lines of the latest ChangeLog entry are:
2010-02-03  Doug Kwan  

* arm-reloc-property.cc
(Arm_reloc_property_table::reloc_name_in_error_message): New method
definition.

configure flags are:
--enable-target=arm

The Linux distribution is Ubuntu 9.10 for ARM.
(I also get two rather easily fixable compilation errors on my system, a
missing #include and an object file that is passed to gcc twice during link.)

-- 
   Summary: Assert failure in arm.cc
   Product: binutils
   Version: 2.21 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: ian at airs dot com
ReportedBy: ahartmetz at gmail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: armv7l-unknown-linux-gnueabi
  GCC host triplet: armv7l-unknown-linux-gnueabi
GCC target triplet: armv7l-unknown-linux-gnueabi


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread ahartmetz at gmail dot com

--- Additional Comments From ahartmetz at gmail dot com  2010-02-04 12:41 
---
(In reply to comment #0)
> The Linux distribution is Ubuntu 9.10 for ARM.
> (I also get two rather easily fixable compilation errors on my system, a
> missing #include and an object file that is passed to gcc twice during link.)

When building gold, that is.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread ian at airs dot com

--- Additional Comments From ian at airs dot com  2010-02-04 15:07 ---
Thanks for the bug report.  Can you list the errors you get when building gold?

-- 
   What|Removed |Added

 CC||dougkwan at google dot com
 Status|NEW |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread ahartmetz at gmail dot com

--- Additional Comments From ahartmetz at gmail dot com  2010-02-04 15:23 
---
(In reply to comment #2)
> Thanks for the bug report.  Can you list the errors you get when building
gold?

The first issue doesn't need much explanation; there is an sprintf() in the
file and no declaration is available.

Index: arm-reloc-property.cc
===
RCS file: /cvs/src/src/gold/arm-reloc-property.cc,v
retrieving revision 1.2
diff -u -r1.2 arm-reloc-property.cc
--- arm-reloc-property.cc   4 Feb 2010 03:32:18 -   1.2
+++ arm-reloc-property.cc   4 Feb 2010 15:11:15 -
@@ -22,6 +22,7 @@
 
 #include "gold.h"
 
+#include 
 #include 
 #include 
 #include 


The other issue I "fixed" by changing the Makefile after it has been generated:
TARGETOBJS =  arm.$(OBJEXT) arm-reloc-property.$(OBJEXT) arm.$(OBJEXT) arm-
reloc-property.$(OBJEXT)
 - remove one of the arm-reloc-property.$(OBJEXT)
The relevant commands and error messages look like this:

ranlib libgold.a
In file included from debug.h:30,
 from target.h:40,
 from object.h:33,
 from arm.cc:42:
errors.h:44: note: the mangling of 'va_list' has changed in GCC 4.4
mv -f .deps/arm.Tpo .deps/arm.Po
g++ -W -Wall-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-
seed=ld-new -g -O2   -o ld-new main.o arm.o arm-reloc-property.o arm.o arm-
reloc-property.o libgold.a ../libiberty/libiberty.a-lz 
g++ -W -Wall-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-
seed=incremental-dump -g -O2   -o incremental-dump incremental-dump.o arm.o
arm-reloc-property.o arm.o arm-reloc-property.o libgold.a
../libiberty/libiberty.a-lz 
arm-reloc-property.o: In function
`gold::Arm_reloc_property_table::reloc_name_in_error_message(unsigned int)':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.h:199: multiple definition
of `gold::Arm_reloc_property_table::reloc_name_in_error_message(unsigned int)'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:293:
first defined here
arm-reloc-property.o: In function
`gold::Arm_reloc_property::Tree_node::make_tree(std::basic_string, std::allocator > const&)':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:45: multiple definition
of `gold::Arm_reloc_property::Tree_node::make_tree(std::basic_string, std::allocator > const&)'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:45:
first defined here
arm-reloc-property.o: In function `Arm_reloc_property':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:92: multiple definition
of `gold::Arm_reloc_property::Arm_reloc_property(unsigned int, char const*,
gold::Arm_reloc_property::Reloc_type, bool,
gold::Arm_reloc_property::Reloc_class, std::basic_string, std::allocator > const&, bool, int, bool)'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:92:
first defined here
arm-reloc-property.o: In function `Arm_reloc_property':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:92: multiple definition
of `gold::Arm_reloc_property::Arm_reloc_property(unsigned int, char const*,
gold::Arm_reloc_property::Reloc_type, bool,
gold::Arm_reloc_property::Reloc_class, std::basic_string, std::allocator > const&, bool, int, bool)'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:92:
first defined here
arm-reloc-property.o: In function `Arm_reloc_property_table':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:258: multiple definition
of `gold::Arm_reloc_property_table::Arm_reloc_property_table()'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:258:
first defined here
arm-reloc-property.o: In function `Arm_reloc_property_table':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:258: multiple definition
of `gold::Arm_reloc_property_table::Arm_reloc_property_table()'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:258:
first defined here
collect2: ld returned 1 exit status
make[2]: *** [ld-new] Error 1
make[2]: *** Waiting for unfinished jobs
arm-reloc-property.o: In function
`gold::Arm_reloc_property_table::reloc_name_in_error_message(unsigned int)':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.h:199: multiple definition
of `gold::Arm_reloc_property_table::reloc_name_in_error_message(unsigned int)'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:293:
first defined here
arm-reloc-property.o: In function
`gold::Arm_reloc_property::Tree_node::make_tree(std::basic_string, std::allocator > const&)':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:45: multiple definition
of `gold::Arm_reloc_property::Tree_node::make_tree(std::basic_string, std::allocator > const&)'
arm-reloc-property.o:/mnt/swap/kde/aux/binutils/gold/arm-reloc-property.cc:45:
first defined here
arm-reloc-property.o: In function `Arm_reloc_property':
/mnt/swap/kde/aux/binutils/gold/arm-reloc-property

[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread ahartmetz at gmail dot com

--- Additional Comments From ahartmetz at gmail dot com  2010-02-04 15:31 
---
(In reply to comment #0)
> configure flags are:
> --enable-target=arm
> 
Correction: --enable-targets=arm.
This is a typo in the comment, not in the original invocation of configure.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread ahartmetz at gmail dot com

--- Additional Comments From ahartmetz at gmail dot com  2010-02-04 15:34 
---
I should also mention that this does not seem to be a regression, gold has so
far always been broken for my uses on ARM in some way.
It does, however, successfully link itself and most parts of Qt.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread dougkwan at google dot com

--- Additional Comments From dougkwan at google dot com  2010-02-04 19:47 
---
Can you try this patch and send me back the error message?

Index: arm.cc
===
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.76
diff -u -u -p -r1.76 arm.cc
--- arm.cc  4 Feb 2010 03:32:18 -   1.76
+++ arm.cc  4 Feb 2010 19:44:50 -
@@ -5654,6 +5654,16 @@ Arm_relobj::scan_sections_fo
  const Output_relaxed_input_section* poris =
  out_sections[index]->find_relaxed_input_section(this, index);
  gold_assert(poris != NULL);
+ if (poris == NULL)
+   {
+ printf("found bad section %s (index %u) in %s\n",
+this->section_name(index).c_str(), index,
+this->name().c_str());
+ const elfcpp::Shdr<32, big_endian> shdr(pshdrs + index);
+ printf("section type=%u section flag=%u\n",
+shdr.get_sh_type(), shdr.get_sh_flags());
+ gold_unreachable();
+   }
  output_address = poris->address();
}




-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread dougkwan at google dot com

--- Additional Comments From dougkwan at google dot com  2010-02-04 22:09 
---
Patch for build breakage submitted in

http://sourceware.org/ml/binutils/2010-02/msg00070.html

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils



[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2010-02-05 
00:30 ---
Subject: Bug 11247

CVSROOT:/cvs/src
Module name:src
Changes by: dougk...@sourceware.org 2010-02-05 00:30:35

Modified files:
gold   : ChangeLog arm-reloc-property.cc configure 
 configure.ac resolve.cc 

Log message:
2010-02-04  Doug Kwan  

PR 11247
* arm-reloc-property.cc (cstdio): Include.
* configure.ac (targetobjs): Remove duplicates.
* configure: Regenerate.
* resolve.cc (Symbol_table::resolve): Explicit instantiate both
big and little endian version for a given address size.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.484&r2=1.485
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/arm-reloc-property.cc.diff?cvsroot=src&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/configure.diff?cvsroot=src&r1=1.55&r2=1.56
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/configure.ac.diff?cvsroot=src&r1=1.52&r2=1.53
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/resolve.cc.diff?cvsroot=src&r1=1.53&r2=1.54



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/11247] Assert failure in arm.cc

2010-02-04 Thread dougkwan at google dot com

--- Additional Comments From dougkwan at google dot com  2010-02-05 00:34 
---
The build breakage has been fixed but we still need to fix the assertion.  I
built Qt-4.6.1 for arm-unknown-linux-gnu using gold as the linker but did not
see the assertion.  I am trying again using the "-march=armv-7a" options to see
if this is related to ARM v7.   

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11247

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils