[Bug binutils/18420] Segfault in readelf with --unwind option

2015-05-18 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=18420

--- Comment #1 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org ---
The master branch has been updated by Nick Clifton ni...@sourceware.org:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b4477bc81824800248d44f141aeaf63e00314a01

commit b4477bc81824800248d44f141aeaf63e00314a01
Author: Nick Clifton ni...@redhat.com
Date:   Mon May 18 15:58:46 2015 +0100

Fix seg-fault in readelf when decoding corrupt IA64 unwind information.

PR binutils/18420
* ia64-unwind.c (unw_decode): Add end parameter.  Pass parameter
on to decode functions.
(unw_devode_p2_p5): Pass end paraemter to UNW_DEC_SPILL_MASK.
(UNW_DEC_SPILL_MASK): Add end parameter.  Check that unw_rlen does
not take us beyond the end of the buffer.
* ia64-unwind.h (unw_decode): Update prototype.
* readelf.c (dump_ia64_unwind): Pass end pointer to unw_decode.

-- 
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/18414] TOC optimization bug (ignoring data deps on addis/ld - nop/ld opt)

2015-05-18 Thread bergner at vnet dot ibm.com
https://sourceware.org/bugzilla/show_bug.cgi?id=18414

Peter Bergner bergner at vnet dot ibm.com changed:

   What|Removed |Added

 CC||bergner at vnet dot ibm.com

-- 
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/18414] TOC optimization bug (ignoring data deps on addis/ld - nop/ld opt)

2015-05-18 Thread hfinkel at anl dot gov
https://sourceware.org/bugzilla/show_bug.cgi?id=18414

--- Comment #6 from Hal Finkel hfinkel at anl dot gov ---
(In reply to Alan Modra from comment #1)
 True, ld will do this.  However, the optimization is relying on gcc to
 generate code that can be optimized this way..  So I'm assuming the example
 code was from llvm or assembly.
 
 gcc ensures that the optimization is valid by adding a dependency on r2 to
 the low part of the address calculation.

LLVM updated to add extra r2 read dependencies on instructions with @toc@l
relocations in r237556.

-- 
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 gas/18427] New: GNU as slow on hppa architecture

2015-05-18 Thread deller at gmx dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=18427

Bug ID: 18427
   Summary: GNU as slow on hppa architecture
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: deller at gmx dot de
CC: dave.anglin at bell dot net
  Target Milestone: ---
Target: hppa

Created attachment 8323
  -- https://sourceware.org/bugzilla/attachment.cgi?id=8323action=edit
preprocessed assembler testcase

I noticed that the GNU assembler is sometimes incredible slow with assembly of
C++ files on hppa. 

Because of that I did a gprof analysis (using the cross-assembler for hppa
running on x86_64) while running gas on a somewhat bigger assembler file
(preprocessed from the debian vtk package).

Here is the result, and it's pretty clear:

Flat profile:
Each sample counts as 0.01 seconds.
  %   cumulative   self  self total
 time   seconds   secondscalls  ms/call  ms/call  name
 81.76 86.3886.38   821598 0.11 0.11  pa_undefine_label
  3.34 89.91 3.53   194747 0.02 0.02  pa_define_label
  1.66 91.66 1.75 read_a_source_file
  1.13 92.85 1.19  2442950 0.00 0.00  frag_offset_fixed_p
  0.73 93.62 0.77  660 1.17 1.17  do_scrub_chars
  0.63 94.29 0.67 symbol_print_statistics
  0.55 94.87 0.58  1414839 0.00 0.00  operand
  0.46 95.36 0.49  3866615 0.00 0.00  frag_now_fix
...
  0.00105.65 0.001 0.0076.43 
resolve_local_symbol_values
  0.00105.65 0.001 0.00 0.00  s_app_file
  0.00105.65 0.001 0.00 0.01  s_space
  0.00105.65 0.001 0.00 0.00  s_weakref
  0.00105.65 0.001 0.00 0.00  symbol_insert

So, the pa_undefine_label() function seems problematic.
I talked to Dave Anglin about that issue, and he came up with the attached
patch. This patch seems to work and speeds up gas a lot, but it will most
likely break HP-UX (which uses multiple segments).

Maybe the experts here have some other idea?
A gzipped-testcase which expands to a 21MB assembler-file is attached.

-- 
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 gas/18427] GNU as slow on hppa architecture

2015-05-18 Thread deller at gmx dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=18427

--- Comment #1 from Helge Deller deller at gmx dot de ---
Created attachment 8324
  -- https://sourceware.org/bugzilla/attachment.cgi?id=8324action=edit
initial version of a proposed patch

-- 
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 gas/18427] GNU as slow on hppa architecture

2015-05-18 Thread dave.anglin at bell dot net
https://sourceware.org/bugzilla/show_bug.cgi?id=18427

--- Comment #2 from dave.anglin at bell dot net ---
On 2015-05-18, at 3:15 PM, deller at gmx dot de wrote:

 So, the pa_undefine_label() function seems problematic.
 I talked to Dave Anglin about that issue, and he came up with the attached
 patch. This patch seems to work and speeds up gas a lot, but it will most
 likely break HP-UX (which uses multiple segments).

Actually, ELF targets such as Linux have multiple segments.  Assembly time
blows up when -ffunction-sections and -fdata-sections are used.  The lists for
each segment are poorly managed, so both the number of lists and their length
grows.

All this overhead is to find the previous label emitted in the current
space/segment.

In practice, GCC never plays with spaces/segments between emitting the label
and
its associated instruction.  So, the previous label is what's needed.  The
tracking is
for hand crafted assembly code.

The patch doesn't affect 32-bit HP-UX SOM.  The patch might affect 64-bit
HP-UX.
I haven't tried it on 64-bit HP-UX.

--
John David Anglin   dave.ang...@bell.net

-- 
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 binutils/18386] callw with 0x66 prefix incorrectly disassembled in 64-bit mode

2015-05-18 Thread jsweval at arxan dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18386

Jevin Sweval jsweval at arxan dot com changed:

   What|Removed |Added

 CC||jsweval at arxan dot com

-- 
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