[Bug ld/21961] --orphan-handling=error fails in 2.29 because of changed .group handling

2017-08-17 Thread andrew.burgess at embecosm dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21961

--- Comment #2 from Andrew Burgess  ---
Created attachment 10348
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10348&action=edit
An initial patch

A quick update to show I'm working on this issue.  

The patch above should fix the regression, but needs some new tests before I
can post to the mailing list.

Working on this I've also spotted some related issues that might crop up when
using `--orphan-handling=error` which I think should probably be fixed in the
same patch, so I'll get that done too.

Feedback on the patch welcome, otherwise I'll post something to the mailing
list soon.

-- 
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/21962] stack overflow in getsym

2017-08-17 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21962

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Hi Zhihua,

Please could you upload the reproducer ?

Cheers
  Nick

-- 
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/21934] gas build fails when using gcc 7

2017-08-17 Thread bneumeier at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21934

--- Comment #14 from Brett Neumeier  ---
(In reply to H.J. Lu from comment #13)
> There is cast to (unsigned char).  Why does GCC see that?  Why does
> it only happen on arm? Also does 'hh" work with all compilers on all
> supported hosts?

Per Martin Sebor's comment, the possible-truncation warning "tends to be
sensitive to char (and short) conversions because of limitations in its
integration with the Value Range Propagation pass." I am not sure precisely
what that means, but I presume that's why the cast is not sufficient to
suppress the false positive warning.

I don't know what circumstances trigger this false positive. I stumbled upon it
in an arm-to-x86_64 cross-binutils build, but I expect that there are other
scenarios where it can occur -- possibly some native builds do, and possibly
other cross-builds do. I don't have the time or energy to do exhaustive tests
to see which combinations trigger the issue.

I don't know everything that is included in the "all compilers and all
supported hosts" set. I do see that the "hh" flag is mandated by C99, but not
by C89.

Are there C89 compilers that binutils needs to support? If so, would a
preprocessor test that adds the "hh" flag only in C99 and later make this patch
acceptable?

-- 
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/21934] gas build fails when using gcc 7

2017-08-17 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21934

--- Comment #15 from H.J. Lu  ---
(In reply to Brett Neumeier from comment #14)
> (In reply to H.J. Lu from comment #13)
> > There is cast to (unsigned char).  Why does GCC see that?  Why does
> > it only happen on arm? Also does 'hh" work with all compilers on all
> > supported hosts?
> 
> Per Martin Sebor's comment, the possible-truncation warning "tends to be
> sensitive to char (and short) conversions because of limitations in its
> integration with the Value Range Propagation pass." I am not sure precisely
> what that means, but I presume that's why the cast is not sufficient to
> suppress the false positive warning.

This is just a speculation.  There could be a real bug in GCC. Please open
a new GCC bug since your old one is lost during bugzilla server crash.

> I don't know what circumstances trigger this false positive. I stumbled upon
> it in an arm-to-x86_64 cross-binutils build, but I expect that there are
> other scenarios where it can occur -- possibly some native builds do, and
> possibly other cross-builds do. I don't have the time or energy to do
> exhaustive tests to see which combinations trigger the issue.

Please follow:

https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction

to reduce your testcase.

> I don't know everything that is included in the "all compilers and all
> supported hosts" set. I do see that the "hh" flag is mandated by C99, but
> not by C89.
> 
> Are there C89 compilers that binutils needs to support? If so, would a
> preprocessor test that adds the "hh" flag only in C99 and later make this
> patch acceptable?

Yes, we support C89.  I still like to understand what the problem is
before deciding what to do since it is possible that "hh" may not
workaround the issue tomorrow.

-- 
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/18808] aborting at bfd/elf64-x86-64.c:3791 in elf_x86_64_relocate_section

2017-08-17 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=18808

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Szabolcs Nagy :

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

commit 545bc2b377db80aa6edd0cf00cde6f963735f8d1
Author: Szabolcs Nagy 
Date:   Thu Aug 17 14:48:03 2017 +0100

[AArch64] Skip IFUNC relocations in debug sections

Skip IFUNC relocations in debug sections ignored by ld.so.
Fixes the following ld test failures on aarch64:

FAIL: Build libpr18808.so
FAIL: Build libpr18808.so_2
FAIL: Run pr18808

aborting at bfd/elfnn-aarch64.c:4986 in elf64_aarch64_final_link_relocate.

bfd/
PR ld/18808
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
relocations in debug sections, change abort to _bfd_error_handler.

-- 
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/21961] --orphan-handling=error fails in 2.29 because of changed .group handling

2017-08-17 Thread franz.sirl at lauterbach dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21961

--- Comment #3 from franz.sirl at lauterbach dot com ---
Did a quick test with the patch and it works fine, both the testcase and the
original application link fine again with --orphan-handling=error.

-- 
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/18841] Data relocations with IFUNC symbols can lead to segfault

2017-08-17 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=18841

--- Comment #11 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_29-branch branch has been updated by Szabolcs Nagy
:

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

commit 6f0f222468cd8cf23cbe2458be233c553842a568
Author: Szabolcs Nagy 
Date:   Tue Jul 4 15:43:59 2017 +0100

[AArch64] Fix PR18841 ifunc relocation ordering

In order to get the ifunc relocs properly sorted the correct class
needs to be returned.  The code mimics what has been done for x86.

Fixes
FAIL: Run pr18841 with libpr18841c.so

bfd/
PR ld/18841
* elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
reloc_class_ifunc for ifunc symbols.

-- 
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/18808] aborting at bfd/elf64-x86-64.c:3791 in elf_x86_64_relocate_section

2017-08-17 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=18808

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_29-branch branch has been updated by Szabolcs Nagy
:

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

commit ba07ff68716d6e764aceca140b9a0a50f9d8d667
Author: Szabolcs Nagy 
Date:   Thu Aug 17 14:48:03 2017 +0100

[AArch64] Skip IFUNC relocations in debug sections

Skip IFUNC relocations in debug sections ignored by ld.so.
Fixes the following ld test failures on aarch64:

FAIL: Build libpr18808.so
FAIL: Build libpr18808.so_2
FAIL: Run pr18808

aborting at bfd/elfnn-aarch64.c:4986 in elf64_aarch64_final_link_relocate.

bfd/
PR ld/18808
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
relocations in debug sections, change abort to _bfd_error_handler.

-- 
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/21964] Invalid entry point used for executables on Windows

2017-08-17 Thread freddy77 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21964

Frediano Ziglio  changed:

   What|Removed |Added

 CC||freddy77 at gmail 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


[Bug gas/21965] New: Kernel 4.12.5 compile fails -- Error: instruction `andn' isn't supported in 16-bit mode.

2017-08-17 Thread fhlfibh at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21965

Bug ID: 21965
   Summary: Kernel 4.12.5 compile fails -- Error: instruction
`andn' isn't supported in 16-bit mode.
   Product: binutils
   Version: 2.28
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: fhlfibh at gmail dot com
  Target Milestone: ---

Hi,

While usual kernel update from 4.9.34 to 4.12.5 it fails with the error:

-
/tmp/cc3rZjPi.s: Assembler messages:
/tmp/cc3rZjPi.s:32: Error: instruction `andn' isn't supported in 16-bit mode.
/tmp/cc3rZjPi.s:40: Error: instruction `shlx' isn't supported in 16-bit mode.
make[1]: *** [scripts/Makefile.build:302: arch/x86/boot/cpucheck.o] Error 1
make: *** [arch/x86/Makefile:281: bzImage] Error 2
make: *** Waiting for unfinished jobs


GNU assembler version 2.28 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.28
p1.2) 2.28

This bug here https://sourceware.org/bugzilla/show_bug.cgi?id=17421 seems to be
similar.

My report on Gentoo bugtracker https://bugs.gentoo.org/show_bug.cgi?id=627890

My report with more detailed debug on kernel.org bugtracker
https://bugzilla.kernel.org/show_bug.cgi?id=196689

Really, I don't know whose bug it actually is...

Sorry.

Regards,
Alex

-- 
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/21962] stack overflow in getsym

2017-08-17 Thread 499671216 at qq dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21962

--- Comment #2 from Zhihua Yao <499671216 at qq dot com> ---
Created attachment 10350
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10350&action=edit
nm -n stack_overflow_getsym  / objdump -S

-- 
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/21962] stack overflow in getsym

2017-08-17 Thread 499671216 at qq dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21962

--- Comment #3 from Zhihua Yao <499671216 at qq dot com> ---
I am sorry, I remember I have uploaded, but not.

-- 
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 gprof/21968] New: gprog taking huge time

2017-08-17 Thread sdasgup3 at illinois dot edu
https://sourceware.org/bugzilla/show_bug.cgi?id=21968

Bug ID: 21968
   Summary: gprog taking huge  time
   Product: binutils
   Version: 2.28
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gprof
  Assignee: unassigned at sourceware dot org
  Reporter: sdasgup3 at illinois dot edu
  Target Milestone: ---

Hello Team,
I am trying to profile LLVM's tool clang (trunk version) using gprof. Here are
the steps that I followed:
1. Build clang with '-no-pie -g -pg' (-no-pie is used because I am using GCC
6.0 which has default binary generated as pie) 
2. ~/Install/llvm.debug.install/bin/clang++ hello.cpp
  - The size of the gmon.out is 40,149,695 Bytes
3. gprof  -Q -b  ~/Install/llvm.debug.install/bin/clang++

and it waits for 2+hrs.

My GCC version used for building clang is: 6.3.0.

Can anybody please let me know if this is expected behavior or is there some
way I can get more insight ?

-- 
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/21970] New: assertion failed if have more than one overlay has subalign specified

2017-08-17 Thread zyfwong at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21970

Bug ID: 21970
   Summary: assertion failed if have more than one overlay has
subalign specified
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: zyfwong at gmail dot com
  Target Milestone: ---

OVERLAY : SUBALIGN(4)
{
   .text : {*(.text);}
}

OVERLAY : SUBALIGN(4)
{
  .data : {*(.data);}
}

this script will trigger the assertion in function `lang_entry_overlay` in
ld/ldlang.c.

seem like overlay_subalign is not reassigned to NULL when leave overlay in
`lang_leave_overlay`

-- 
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/21970] assertion failed if have more than one overlay has subalign specified

2017-08-17 Thread zyfwong at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21970

huang zhenyu  changed:

   What|Removed |Added

 CC||zyfwong at gmail 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