[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


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

2010-02-05 Thread ahartmetz at gmail dot com

--- Additional Comments From ahartmetz at gmail dot com  2010-02-05 17:23 
---
(In reply to comment #9)
> 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.   
(In reply to comment #9)
> 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.   

I've updated bintuils to the latest CVS version and applied the patch (I removed
the assert before the debug output though ;)
The output is:
found bad section .eh_frame (index 14) in obj/release/pcre_compile.o
section type=0 section flag=0
/usr/bin/ld: internal error in scan_sections_for_stubs, at arm.cc:5664
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtScript.so.4.6.1] Error 1
make[1]: Leaving directory `/mnt/swap/kde/kde-qt/src/script'
make: *** [sub-script-make_default-ordered] Error 2

As the error might be related to Thumb-2 code it might be of interest that
rgular expressions and JavaScript are just-in-time compiled in WebKit, and the
JIT compiler seems to use Thumb(-2) via stubs written in Assembly, unlike the
regularly compiled rest.

-- 


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-05 Thread dougkwan at google dot com

--- Additional Comments From dougkwan at google dot com  2010-02-05 17:56 
---
Subject: Re:  Assert failure in arm.cc

2010/2/5 ahartmetz at gmail dot com :

> I've updated bintuils to the latest CVS version and applied the patch (I 
> removed
> the assert before the debug output though ;)
> The output is:
> found bad section .eh_frame (index 14) in obj/release/pcre_compile.o
> section type=0 section flag=0
> /usr/bin/ld: internal error in scan_sections_for_stubs, at arm.cc:5664
> collect2: ld returned 1 exit status
> make[1]: *** [../../lib/libQtScript.so.4.6.1] Error 1
> make[1]: Leaving directory `/mnt/swap/kde/kde-qt/src/script'
> make: *** [sub-script-make_default-ordered] Error 2
>
> As the error might be related to Thumb-2 code it might be of interest that
> rgular expressions and JavaScript are just-in-time compiled in WebKit, and the
> JIT compiler seems to use Thumb(-2) via stubs written in Assembly, unlike the
> regularly compiled rest.

It's not THUMB-2 related.  The EH_FRAME sections are special and
should not be subject to any stub-scanning,  I just need to skip them.
 Thanks for the information.

-Doug


-- 


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-05 Thread cvs-commit at gcc dot gnu dot org

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

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

Modified files:
gold   : ChangeLog arm.cc 

Log message:
2010-02-05  Doug Kwan  

PR 11247
* arm.cc (Arm_relobj::section_is_scannable): New method.
(Arm_relobj::section_needs_reloc_stub_scanning): Use it.
(Arm_relobj::section_needs_cortex_a8_stub_scanning): Same.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.485&r2=1.486
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gold/arm.cc.diff?cvsroot=src&r1=1.76&r2=1.77



-- 


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-05 Thread dougkwan at google dot com

--- Additional Comments From dougkwan at google dot com  2010-02-06 04:31 
---
I added code to avoid stub scanning for merged sections.   This should fix your
problem.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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-06 Thread ahartmetz at gmail dot com

--- Additional Comments From ahartmetz at gmail dot com  2010-02-06 13:22 
---
(In reply to comment #13)
> I added code to avoid stub scanning for merged sections.   This should fix
your
> problem.

Yes, it's fixed now. Thanks a lot.

-- 


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