[Bug binutils/15082] tic6x - incorrect decoding of MPYDP instruction with xpath bit set

2013-01-30 Thread alexis.deruelle at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15082

--- Comment #1 from Alexis Deruelle  
2013-01-30 09:33:58 UTC ---
Ti's dis6x output for the case (compiled with cl6x -mv6740) :

 .text:
      NOP
0004   1702   MPYDP.M2X B1:B0,A1:A0,B1:B0

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #5 from Rainer Orth  2013-01-30 
09:31:13 UTC ---
The reghunt identified the following patch as the culprit:

2011-12-07  Alan Modra  

   PR ld/12772
   * elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols
   defined in shared libraries.

To verify, I've reverted just this patch in a binutils 2.23.1 tree,
rebuilt gld and all the EH failure were gone in a fresh gcc mainline
bootstrap.

Rainer

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15025] --enable-initfini-array creates .init_array where no input has one

2013-01-30 Thread rguenther at suse dot de
http://sourceware.org/bugzilla/show_bug.cgi?id=15025

--- Comment #21 from rguenther at suse dot de 2013-01-30 10:24:23 UTC ---
On Tue, 29 Jan 2013, hjl.tools at gmail dot com wrote:

> http://sourceware.org/bugzilla/show_bug.cgi?id=15025
> 
> --- Comment #20 from H.J. Lu  2013-01-29 16:47:48 
> UTC ---
> (In reply to comment #19)
> > 
> > I don't see how this can fix a binutils bug.
> 
> It should fix your glibc 2.11.3 build problem.

I am not convinced my customers will not run into the same issue.
It's a binutils bug, it needs a binutils fix.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #6 from Alan Modra  2013-01-30 11:36:37 
UTC ---
What differences are shown by nm -D -n between the good and bad libstdc++.so?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread ro at TechFak dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #7 from Rainer Orth  2013-01-30 
11:43:01 UTC ---
Created attachment 6836
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6836
good nm -D -n output

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread ro at TechFak dot Uni-Bielefeld.DE
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #8 from Rainer Orth  2013-01-30 
11:44:10 UTC ---
Created attachment 6837
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6837
bad nm -D -n output

Among many others, the undefined reference to __tls_get_addr is gone.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #9 from Alan Modra  2013-01-30 12:57:20 
UTC ---
The question then is "Why didn't _bfd_elf_gc_mark_rsec mark __tls_get_addr?" 
_bfd_elf_gc_mark_rsec ought to be called for every relocation in kept sections
of libstdc++.so, and so set h->mark for __tls_get_addr.  Answering my own
question, I guess this is because one or more SPARC relocs reference
__tls_get_addr *implicitly*, R_SPARC_TLS_LDM_CALL and R_SPARC_TLS_GD_CALL by
the look of it.  _bfd_sparc_elf_gc_mark_hook will need to do the marking.  I'm
sure you or David can throw together a patch to fix this.  If not, I'll hack on
it myself tomorrow.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15025] --enable-initfini-array creates .init_array where no input has one

2013-01-30 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15025

--- Comment #22 from H.J. Lu  2013-01-30 16:36:44 
UTC ---
Only terminators in .ctors/.dtors sections cause the problem,
which are provided in compilers and C libraries.  We deal
with this issue by special case of GCC and fixing glibc
source.  We haven't seen any other problems since this change
was made more than 2 years ago.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread davem at davemloft dot net
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #10 from David S. Miller  2013-01-30 
18:11:21 UTC ---
Thanks a lot Alan, I'll take it from here.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread davem at davemloft dot net
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

David S. Miller  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at sourceware|davem at davemloft dot net
   |dot org |

--- Comment #11 from David S. Miller  2013-01-30 
19:59:03 UTC ---
Created attachment 6838
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6838
Fix for __tls_get_addr garbage collection on sparc.

Rainer please give this patch a test.  I'll try to put together a test case
meanwhile.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug gold/15070] gold crashes on ARMv5 due to unaligned memory access

2013-01-30 Thread roland at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=15070

--- Comment #1 from Roland McGrath  2013-01-30 22:29:45 
UTC ---
It looks like that fix will work fine.  But it is far from obvious that
it's what's required or if it's the ideal thing.

The comment on File_read::get_view says the flag "is true if the data must
be naturally aligned".  What the fileread.cc code actually does is ensure
that it is aligned to the word-size of the ELF file (i.e. only ever to 32
bits or to 64 bits).  What "naturally aligned" means to me is aligned to
the size of the datum in question, so in get_view it looks like it would
require it to be aligned to the SIZE parameter.  That would be
unnecessarily large alignment for ELFCLASS64 (Elf64_Ehdr is 64 bytes) and
nonsensical for ELFCLASS32 (Elf32_Ehdr is 52 bytes, not a power of two).
So I think the comment on File_read::get_view in fileread.h should be
changed to be more clear about the meaning of its ALIGNED parameter.

That aside, it's not at all clear to me across all those layers where the
alignment requirement comes from.  The elfcpp code is a bit light on
comments, but I don't see any place that it states there are alignment
requirements for the pointers that File::View::data returns.  If that is
the intent, then it should be stated clearly somewhere in the interface
comments.

I think the scenario hitting this must be looking at files in an archive.
I can't think of any other situation in which the start of the ELF header
could ever be misaligned.  This makes me wonder if every other place in
gold that's using elfcpp code with its implicit assumption of aligned
header data has correctly indicated in its View implementations that the
alignment must be ensured.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug gold/15070] gold crashes on ARMv5 due to unaligned memory access

2013-01-30 Thread shawnlandden at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15070

--- Comment #2 from Shawn Landden  2013-01-31 
02:26:54 UTC ---
Created attachment 6839
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6839
alternate fix

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #12 from Alan Modra  2013-01-31 04:03:49 
UTC ---
So there's no need for gc_mark_hook to return the section of the symbol on the
R_SPARC_TLS_GD_CALL?  ie. you're sure that section will be marked from some
other reloc?  If not then something like the following is needed.

  if (info->shared)
switch (SPARC_ELF_R_TYPE (rel->r_info))
  {
  case R_SPARC_TLS_GD_CALL:
  case R_SPARC_TLS_LDM_CALL:
tga = elf_link_hash_lookup (elf_hash_table (info), "__tls_get_addr",
FALSE, FALSE, TRUE);
BFD_ASSERT (tga != NULL);
tga->mark = 1;
if (tga->u.weakdef != NULL)
  tga->u.weakdef->mark = 1;
/* If __tls_get_addr might ever have a regular definition,
   then we need to mark its section too.  */
rsec = _bfd_elf_gc_mark_hook (sec, info, rel, tga, NULL);
if (rsec && !rsec->gc_mark)
  {
if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour
|| (rsec->owner->flags & DYNAMIC) != 0)
  rsec->gc_mark = 1;
else
  /* FIXME: return error from _bfd_elf_gc_mark somehow.  */
  _bfd_elf_gc_mark (info, rsec, _bfd_sparc_elf_gc_mark_hook);
  }
  }

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread davem at davemloft dot net
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #13 from David S. Miller  2013-01-31 
04:07:01 UTC ---
Yes, we are guarenteed that the symbol that's actually attached to the LDM_CALL
and GD_CALL relocs will be referenced by other relocations.

The TLS calls never exist by themselves, they always exist alongside other TLS
relocations over the same symbol.

BTW, tilegx and tilepro BFD elf backends have this same exact GC bug.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #14 from Alan Modra  2013-01-31 04:33:22 
UTC ---
OK, I thought that might be the case.  tilegx and tilepro probably copied
sparc. :)  BTW, some nits in your patch.  You should zap sym as well, just in
case the tls sym is local.  Also, condition on info->shared to match
check_relocs creation of __tls_get_addr sym and relocate_section optimization. 
And something for later, they probably all should be !info->executable.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread davem at davemloft dot net
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #15 from David S. Miller  2013-01-31 
05:28:40 UTC ---
Ok I ran Rainer's test case and my patch as attached doesn't work, but
something along the line of Alan's suggestion does.  I'll go figure this out.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

Alan Modra  changed:

   What|Removed |Added

   Attachment #6838|0   |1
is obsolete||

--- Comment #16 from Alan Modra  2013-01-31 06:10:42 
UTC ---
Created attachment 6840
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6840
revised patch

This one sets h->mark, critical to fixing this bug, and the same problem in
tilepro and tilegx.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread davem at davemloft dot net
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #17 from David S. Miller  2013-01-31 
07:14:10 UTC ---
Alan that patch works, please check it in to mainline (and on any relevant
active branch too).  Thanks!

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #18 from cvs-commit at gcc dot gnu.org  2013-01-31 07:32:50 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:amo...@sourceware.org2013-01-31 07:32:45

Modified files:
bfd: ChangeLog elfxx-sparc.c elf32-tilepro.c 
 elfxx-tilegx.c 

Log message:
PR ld/15056
* elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
references to __tls_get_addr.
* elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise.  Correct
vtinherit and vtentry reloc handling too.
* elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5922&r2=1.5923
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfxx-sparc.c.diff?cvsroot=src&r1=1.71&r2=1.72
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-tilepro.c.diff?cvsroot=src&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfxx-tilegx.c.diff?cvsroot=src&r1=1.18&r2=1.19

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

--- Comment #19 from cvs-commit at gcc dot gnu.org  2013-01-31 07:35:33 UTC ---
CVSROOT:/cvs/src
Module name:src
Branch: binutils-2_23-branch
Changes by:amo...@sourceware.org2013-01-31 07:35:26

Modified files:
bfd: ChangeLog elfxx-sparc.c elf32-tilepro.c 
 elfxx-tilegx.c 

Log message:
PR ld/15056
* elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
references to __tls_get_addr.
* elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise.  Correct
vtinherit and vtentry reloc handling too.
* elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_23-branch&r1=1.5758.2.39&r2=1.5758.2.40
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfxx-sparc.c.diff?cvsroot=src&only_with_tag=binutils-2_23-branch&r1=1.69&r2=1.69.4.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-tilepro.c.diff?cvsroot=src&only_with_tag=binutils-2_23-branch&r1=1.10.4.3&r2=1.10.4.4
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfxx-tilegx.c.diff?cvsroot=src&only_with_tag=binutils-2_23-branch&r1=1.11.4.3&r2=1.11.4.4

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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


[Bug ld/15056] gld 2.23.1 mishandles R_SPARC_TLS_LDM_CALL

2013-01-30 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15056

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #20 from Alan Modra  2013-01-31 07:36:12 
UTC ---
Fixed

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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