[Bug gas/24444] New: assembling big file with a lot of .loc views takes forever

2019-04-11 Thread jcmvbkbc at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=2

Bug ID: 2
   Summary: assembling big file with a lot of .loc views takes
forever
   Product: binutils
   Version: 2.33 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: jcmvbkbc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 11737
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11737&action=edit
reproducer assembly source

Compiling gnuradio with debug info for the xtensa-linux host gets stuck in
assembler for hours.
The following is seen in gdb:

...
#6352 0x555aedc5 in symbol_clone_if_forward_ref
(symbolP=0x59f50590, is_forward=0) at ../../binutils-gdb/gas/symbols.c:808
#6353 0x555aedda in symbol_clone_if_forward_ref
(symbolP=0x59f50610, is_forward=0) at ../../binutils-gdb/gas/symbols.c:809
#6354 0x555aedc5 in symbol_clone_if_forward_ref
(symbolP=0x59f509d0, is_forward=0) at ../../binutils-gdb/gas/symbols.c:808
#6355 0x555aedda in symbol_clone_if_forward_ref
(symbolP=0x59f50a50, is_forward=0) at ../../binutils-gdb/gas/symbols.c:809
#6356 0x555aedc5 in symbol_clone_if_forward_ref
(symbolP=0x59f50ed0, is_forward=0) at ../../binutils-gdb/gas/symbols.c:808
#6357 0x555aedda in symbol_clone_if_forward_ref
(symbolP=0x59f55210, is_forward=0) at ../../binutils-gdb/gas/symbols.c:809
#6358 0x55597310 in operand (expressionP=0x7fffe130,
mode=expr_normal) at ../../binutils-gdb/gas/expr.c:1364
#6359 0x555978cb in expr (rankarg=0, resultP=0x7fffe130,
mode=expr_normal) at ../../binutils-gdb/gas/expr.c:1765
#6360 0x555bb349 in xtensa_elf_cons (nbytes=2) at
../../binutils-gdb/gas/config/tc-xtensa.c:1665
#6361 0x555a3a3f in read_a_source_file (name=0x7fffe828
"ccrMJNBu.s") at ../../binutils-gdb/gas/read.c:1148
#6362 0x5558e10c in perform_an_assembly_pass (argc=0,
argv=0x55943b38) at ../../binutils-gdb/gas/as.c:1190
#6363 0x5558e4d7 in main (argc=2, argv=0x55943b30) at
../../binutils-gdb/gas/as.c:1348

I.e. huge recursion in symbol_clone_if_forward_ref when the code references
labels defined by .loc view.
Example assembly source 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/24444] assembling big file with a lot of .loc views takes forever

2019-04-11 Thread jcmvbkbc at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=2

jcmvbkbc at gcc dot gnu.org changed:

   What|Removed |Added

 Target||xtensa-elf,
   ||xtensa-linux-uclibc

-- 
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/24435] heap overflow in bfd_getl64

2019-04-11 Thread ago at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

--- Comment #5 from Agostino Sarubbo  ---
Created attachment 11738
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11738&action=edit
testcase2

Can you try this testcase instead?

-- 
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/24435] heap overflow in bfd_getl64

2019-04-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

Alan Modra  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2019-04-11
 Resolution|DUPLICATE   |---
 Ever confirmed|0   |1

--- Comment #6 from Alan Modra  ---
Yes, with the right testcase I see the error on master.

-- 
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/24435] heap overflow in bfd_getl64

2019-04-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

Alan Modra  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED
 CC|amodra at gmail dot com|
   Assignee|unassigned at sourceware dot org   |amodra 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 binutils/24435] heap overflow in bfd_getl64

2019-04-11 Thread ago at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

--- Comment #7 from Agostino Sarubbo  ---
Well, the testcase to reproduce on master is different from the testcase to
reproduce on 2.32

-- 
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/24302] When DF_BIND_NOW the dt_tlsdesc_got should not be used

2019-04-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24302

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Tamar Christina
:

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

commit ce12121b63145322b4961bbb2b94b939cb916ba7
Author: Tamar Christina 
Date:   Thu Apr 11 11:27:28 2019 +0100

AArch64: When DF_BIND_NOW don't use TLSDESC GOT value.

When using DF_BIND_NOW on AArch64 we don't reserve the GOT slot for a
TLSDESC,
but we still emitted DT_TLSDESC_GOT and DT_TLSDESC_PLT.  This caused random
memory corruption as the "special" value of (bfd_vma)-1 would be set for
dt_tlsdesc_got.

Since we don't have a value of dt_tlsdesc_got I also don't emit
DT_TLSDESC_PLT
now becuase it would point to an incomplete PLT. To be able to write the
PLT
entry DT_TLSDESC_GOT is needed and since we don't have one we can't write
the
PLT entry either.

It is my understanding that GLIBC doesn't need these two entries when not
lazy
loading.  Conversely AArch32 does not reserve neither the GOT not the PLT
slot
when doing DF_BIND_NOW.

AArch32 does not need these checks because these values are initialized to
0
and so the if (...) checks don't pass, but on AArch64 these are initialized
to (bfd_vma)-1 and thus we need some extra checks.

bfd/ChangeLog:

PR ld/24302
* elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
(elfNN_aarch64_finish_dynamic_sections): Don't write PLT if
DF_BIND_NOW.

ld/ChangeLog:

PR ld/24302
* testsuite/ld-aarch64/aarch64-elf.exp: Add new test.
* testsuite/ld-aarch64/tls-relax-gdesc-le-now.d: New test.

-- 
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/24302] When DF_BIND_NOW the dt_tlsdesc_got should not be used

2019-04-11 Thread tnfchris at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24302

Tamar Christina  changed:

   What|Removed |Added

 Target||aarch64-*-*
 Status|NEW |ASSIGNED
   Target Milestone|--- |2.32

--- Comment #5 from Tamar Christina  ---
Waiting a few days to backport to the stable 2.32 branch.

-- 
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/24302] When DF_BIND_NOW the dt_tlsdesc_got should not be used

2019-04-11 Thread wangtao42 at huawei dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24302

--- Comment #6 from Tao Wang  ---
(In reply to Tamar Christina from comment #5)
> Waiting a few days to backport to the stable 2.32 branch.

Thanks Tamar.

-- 
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/24435] buffer overflow reading dynamic entries

2019-04-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

Alan Modra  changed:

   What|Removed |Added

Summary|heap overflow in bfd_getl64 |buffer overflow reading
   ||dynamic entries

-- 
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/24435] buffer overflow reading dynamic entries

2019-04-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

--- Comment #8 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

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

commit 9bff840e8cc560f5096a43609ed3e0d980733fd9
Author: Alan Modra 
Date:   Thu Apr 11 19:42:31 2019 +0930

PR24435, buffer overflow reading dynamic entries

PR 24435
* elflink.c (elf_link_add_object_symbols): Don't read partial
dynamic entries from fuzzed objects.

-- 
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/24435] buffer overflow reading dynamic entries

2019-04-11 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24435

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Alan Modra  ---
Fixed

-- 
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/24447] New: Provides patches for all CVEs in version 2.31.1

2019-04-11 Thread wp_scut at 163 dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24447

Bug ID: 24447
   Summary: Provides patches for all CVEs in version 2.31.1
   Product: binutils
   Version: 2.31
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: wp_scut at 163 dot com
  Target Milestone: ---

Created attachment 11739
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11739&action=edit
run the file of patch_all.sh, then patch will take effect

Hi, when we recently used the 2.31.1 version of binutils, we found 13 CVEs, 10
of which have been fixed, 1 is non-problem, and 2 have been moved to gcc.

Then we have integrated the fixed solution, and the script file is written
according to the order of the 9 patch files (two of which are repaired by the
same patch), and the replacement of the source file can be completed at one
time. 

Considering that some developers who have to use binutils(2.31.1) will also
encounter problems like us, the script files and patch files are provided in
the attachment for other developers to use.

Attachment contains 9 patch files and scripts.

-- 
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/24436] assertion failure in elf64-x86-64.c:2374

2019-04-11 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24436

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

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

commit ca4e63310228df72ba47e5b29f4c275e62496dcf
Author: H.J. Lu 
Date:   Thu Apr 11 07:53:55 2019 -0700

Add PR ld/24436 to ChangeLog entry

-- 
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/24436] assertion failure in elf64-x86-64.c:2374

2019-04-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24436

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.33

--- Comment #3 from H.J. Lu  ---
Fixed by:

commit a0ea3a14dc6a6062c0c1f2bfbb7ad0373ec20843
Author: H.J. Lu 
Date:   Thu Apr 11 06:44:53 2019 -0700

Check corrupt VTENTRY entry in bfd_elf_gc_record_vtentry

-- 
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/23880] Gold can't handle .gnu.build.attributes section with relocations

2019-04-11 Thread howaboutsynergy at pm dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=23880

howaboutsynergy at pm dot me changed:

   What|Removed |Added

 CC||howaboutsynergy at pm dot me

--- Comment #3 from howaboutsynergy at pm dot me ---
I hit this issue with Rust when compiling Firefox with ld.gold linker(which it
doesn't do by default!)
https://github.com/rust-lang/rust/issues/59652#issuecomment-482253086

-- 
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/24449] New: Gold linker doesn't work as expected with indirectly linked libraries with rpath.

2019-04-11 Thread amitarya2187 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24449

Bug ID: 24449
   Summary: Gold linker doesn't work as expected with indirectly
linked libraries with rpath.
   Product: binutils
   Version: 2.25
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: amitarya2187 at gmail dot com
CC: ian at airs dot com
  Target Milestone: ---

Gold linker doesn't seeem to respect rpath for indirectly linked libraries. I 
use
rpath to link against libraries found in crosstool.

So building a file main.cpp looks like the following.

BUILD
==
/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++
\
-o dns \
   
-B/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin.gold
\
   
-Wl,--dynamic-linker=/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/lib/ld-linux-x86-64.so.2
\
   
-Wl,-rpath=/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/lib
\
main.cpp \

Filtering libnss* and libresolv.so in strace.
==
% strace -e open ./main |& grep -E "nss.*so|resolv.*so" | grep -v "= -1"
open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libnss_mdns4_minimal.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libnss_myhostname.so.2", O_RDONLY|O_CLOEXEC) = 3

Meanwhile with standard linker.
===

% strace -e open ./dns |& grep -E "nss.*so|resolv.*so" | grep -v "= -1"
open("/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/lib/libnss_files.so.2",
O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libnss_mdns4_minimal.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/lib/libnss_dns.so.2",
O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/scaligent/toolchain/crosstool/v4/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/lib/libresolv.so.2",
O_RDONLY|O_CLOEXEC) = 3

The problem is resolved when I provided "-lnss_files -lnss_dns -lresolv" in the
build command, but this behavior seems confusing.

-- 
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/24450] New: Missing ALIGN_WITH_INPUT in one texinfo page

2019-04-11 Thread bugs at chead dot ca
https://sourceware.org/bugzilla/show_bug.cgi?id=24450

Bug ID: 24450
   Summary: Missing ALIGN_WITH_INPUT in one texinfo page
   Product: binutils
   Version: 2.33 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: bugs at chead dot ca
  Target Milestone: ---

On the page “Output Section Description”, the ALIGN_WITH_INPUT attribute is
shown in the syntax (ld.texi line 4289). However, on the page “Output Section
Attributes”, ALIGN_WITH_INPUT is missing (ld.texi line 5000).

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