[Bug binutils/20343] Document how to use LTO

2016-07-27 Thread markus at trippelsdorf dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=20343

--- Comment #10 from Markus Trippelsdorf  ---
(In reply to dilyan.palau...@aegee.org from comment #9)
> When the bfd-plugins directory looks like:
> 
> me@home:/usr/local/lib/bfd-plugins# ls -l
> total 4
> lrwxrwxrwx 1 root staff 14 Jul 21 15:11 LLVMgold.so -> ../LLVMgold.so
> lrwxrwxrwx 1 root staff 71 Jul 10 17:56 liblto_plugin.so.0.0.0 ->
> /usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.1/liblto_plugin.so.0.0.0*
> 
> 
> How does "nm t.o" decide, if it shall open liblto_plugin or LLVMgold to
> proceed the .o file?

It tries them in alphabetic order. The first plugin that claims the object
in question gets used.

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


Re: null deref in c++ demangler

2016-07-27 Thread Markus Trippelsdorf
On 2016.07.27 at 13:48 +0200, panc...@nopcode.org wrote:
> pointed out by scan coverity
> 
> fixed in my copy: 
> https://github.com/radare/radare2/commit/f2c0ad9edbba42039c4df692370524a724eee59f

The demangler is part of libiberty and it is part of gcc.
So please post your patch (inline in email) to gcc-patc...@gcc.gnu.org.

-- 
Markus

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


[Bug binutils/20343] Document how to use LTO

2016-07-27 Thread dilyan.palauzov at aegee dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=20343

--- Comment #9 from dilyan.palauzov at aegee dot org  ---
When the bfd-plugins directory looks like:

me@home:/usr/local/lib/bfd-plugins# ls -l
total 4
lrwxrwxrwx 1 root staff 14 Jul 21 15:11 LLVMgold.so -> ../LLVMgold.so
lrwxrwxrwx 1 root staff 71 Jul 10 17:56 liblto_plugin.so.0.0.0 ->
/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.1/liblto_plugin.so.0.0.0*


How does "nm t.o" decide, if it shall open liblto_plugin or LLVMgold to proceed
the .o file?

Why does ld proceed in a different way?

-- 
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/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2016-07-27 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

--- Comment #17 from John Paul Adrian Glaubitz  ---
(In reply to Nick Clifton from comment #16)
> *B..* .  No, it does not.  So my 2.26.1 patch will be useless.
> *sigh*

It does seem to build fine, however. The binutils Debian package with the patch
applied has been building on qemu-sh4 for a while now. I still want to let it
finish.

> Adrian - is there any chance that you could switch to 2.27 and apply the
> original patch ?

Not sure whether I can build an upstream version of binutils on Debian without
further patching. I will give it a try, but it may take a few days (including
the test build of qtwebkit) before I will be able to provide feedback.

Thanks,
Adrian

-- 
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/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2016-07-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

--- Comment #16 from Nick Clifton  ---
Hi H.J.

>>> I would love to test this patch. Could you provide a version which applies 
>>> against 2.26.1? 
>>
>> Here you go.

> Does 2.26.1 support CHECK_RELOCS_AFTER_OPEN_INPUT? I only added it to 2.27.

*B..* .  No, it does not.  So my 2.26.1 patch will be useless.
*sigh*

Adrian - is there any chance that you could switch to 2.27 and apply the
original patch ?

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 ld/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2016-07-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

--- Comment #15 from H.J. Lu  ---
(In reply to Nick Clifton from comment #14)
> Created attachment 9406 [details]
> Proposed patch
> 
> Hi Adrian,
> 
> > I would love to test this patch. Could you provide a version which applies 
> > against 2.26.1? 
> 
> Here you go.
> 
> Cheers
>   Nick

Does 2.26.1 support CHECK_RELOCS_AFTER_OPEN_INPUT? I only added it to 2.27.

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


Re: null deref in c++ demangler

2016-07-27 Thread pancake
done. thanks
> On 27 Jul 2016, at 15:44, Markus Trippelsdorf  wrote:
> 
> On 2016.07.27 at 13:48 +0200, panc...@nopcode.org wrote:
>> pointed out by scan coverity
>> 
>> fixed in my copy: 
>> https://github.com/radare/radare2/commit/f2c0ad9edbba42039c4df692370524a724eee59f
> 
> The demangler is part of libiberty and it is part of gcc.
> So please post your patch (inline in email) to gcc-patc...@gcc.gnu.org.
> 
> -- 
> Markus


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


null deref in c++ demangler

2016-07-27 Thread pancake
pointed out by scan coverity

fixed in my copy: 
https://github.com/radare/radare2/commit/f2c0ad9edbba42039c4df692370524a724eee59f
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20401] segfault in fini_reloc_cookie_rels() with --gc-sections

2016-07-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20401

--- Comment #10 from Nick Clifton  ---
(In reply to Ozkan Sezer from comment #8)
> It would be great if the fix goes into the 2.27 branch too.

Done. :-)

-- 
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/20401] segfault in fini_reloc_cookie_rels() with --gc-sections

2016-07-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20401

--- Comment #9 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_27-branch branch has been updated by Nick Clifton
:

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

commit 492a7a54d688b511b0ed47c1f0ab054334a4b218
Author: Nick Clifton 
Date:   Wed Jul 27 13:18:13 2016 +0100

Fix seg fault in linker when performing garbage collection on COFF based
targets.

PR ld/20401
bfd * coffgen.c (fini_reloc_cookie_rels): Check for the extistence
of the coff_section_data before using it.

-- 
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/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2016-07-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

--- Comment #14 from Nick Clifton  ---
Created attachment 9406
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9406&action=edit
Proposed patch

Hi Adrian,

> I would love to test this patch. Could you provide a version which applies 
> against 2.26.1? 

Here you go.

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 ld/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2016-07-27 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

--- Comment #13 from John Paul Adrian Glaubitz  ---
Hi Nick!

(In reply to Nick Clifton from comment #12)
> Right - please could someone try out this potential patch ?  It works with
> the
> small testcase provided.  But I am not an SH expert and I do not have an SH
> Linux system in which to test it thoroughly.  So I am asking for help.
> 
> (...)
> 
> If necessary I can provide a version of the patch made against the 2.26 or
> 2.25 releases, although I suspect that this version (made against the
> current mainline sources) should be able to be applied without too much
> hassle.

I would love to test this patch. Could you provide a version which applies
against 2.26.1? I will then build a patched version of binutils in Debian and
verify whether I will be able to build Qt5.

Adrian

-- 
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/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5

2016-07-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17739

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #12 from Nick Clifton  ---
Created attachment 9405
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9405&action=edit
Proposed patch

(In reply to Rich Felker from comment #11)
> Ping?

Right - please could someone try out this potential patch ?  It works with the
small testcase provided.  But I am not an SH expert and I do not have an SH
Linux system in which to test it thoroughly.  So I am asking for help.

The patch implement's H.J.Lu's suggestion of delaying check_relocs until after
all the input files have been loaded, and linker garbage collection performed,
which means that there is no need for a sweep pass to correct GOT entry counts.

If necessary I can provide a version of the patch made against the 2.26 or 2.25
releases, although I suspect that this version (made against the current
mainline sources) should be able to be applied without too much hassle.

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 ld/20401] segfault in fini_reloc_cookie_rels() with --gc-sections

2016-07-27 Thread sezeroz at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20401

--- Comment #8 from Ozkan Sezer  ---
Many thanks.  It would be great if the fix goes into the 2.27 branch too.
Regards.

-- 
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/20401] segfault in fini_reloc_cookie_rels() with --gc-sections

2016-07-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20401

Nick Clifton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Nick Clifton  ---
Hi Ozkan,

  Thanks for the crt0.o file.  With that I was able to reproduce the problem,
confirm that your patch works, and track down the underlying issue - the
relocations that are processed during garnage collection were not being cached,
but the code in fini_reloc_cookie_rels was assuming that they were cached.

  I have now applied your patch, with an added comment explaining why the fix
is needed.

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 ld/20401] segfault in fini_reloc_cookie_rels() with --gc-sections

2016-07-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20401

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

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

commit 147d994bcdd36a177e49e7b6ac8d9c1f7b4cdcf5
Author: Nick Clifton 
Date:   Wed Jul 27 10:49:32 2016 +0100

Fix seg-fault when running garbage collection on coff binaries.

PR ld/20401
* coffgen.c (fini_reloc_cookie_rels): Check for the extistence
of the coff_section_data before using it.

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