[Bug binutils/29389] Failed assertions in bfd/cofflink.c and bfd/coff-x86_64.c during the linking stage (MSYS2 MinGW64)

2022-07-22 Thread luca.bacci at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #2 from Luca Bacci  ---
Hello, Alan!

I was about to prepare a bundle with all the object files, while a stumbled
upon this message:

$ cp subprojects/gtk/gtk/compose/compose-parse.exe.p/compose-parse.c.obj
"subprojects/gtk/gtk/libgtk.a" "subprojects/gtk/gtk/css/libgtk_css.a"
"subprojects/glib/glib/libglib-2.0.dll.a"
"subprojects/glib/gobject/libgobject-2.0.dll.a"
"subprojects/glib/gio/libgio-2.0.dll.a"
"subprojects/glib/gmodule/libgmodule-2.0.dll.a" "subprojects/gtk/gdk/libgdk.a"
"subprojects/gtk/gdk/win32/libgdk-win32.a" "subprojects/gtk/gsk/libgsk.a"
"subprojects/gtk/gsk/libgsk_f16c.a"
"D:/msys64/mingw64/lib/libpangocairo-1.0.dll.a"
"D:/msys64/mingw64/lib/libpango-1.0.dll.a"
"D:/msys64/mingw64/lib/libgobject-2.0.dll.a"
"D:/msys64/mingw64/lib/libglib-2.0.dll.a" "D:/msys64/mingw64/lib/libintl.dll.a"
"D:/msys64/mingw64/lib/libharfbuzz.dll.a"
"D:/msys64/mingw64/lib/libcairo.dll.a" "D:/msys64/mingw64/lib/libfribidi.dll.a"
"D:/msys64/mingw64/lib/libcairo-gobject.dll.a"
"D:/msys64/mingw64/lib/libgdk_pixbuf-2.0.dll.a"
"D:/msys64/mingw64/lib/libepoxy.dll.a"
"D:/msys64/mingw64/lib/libgraphene-1.0.dll.a"
"D:/msys64/mingw64/lib/libpangowin32-1.0.dll.a"
"D:/msys64/mingw64/lib/libpangoft2-1.0.dll.a"
"D:/msys64/mingw64/lib/libfontconfig.dll.a"
"D:/msys64/mingw64/lib/libfreetype.dll.a"
"D:/msys64/mingw64/lib/libpng16.dll.a" "D:/msys64/mingw64/lib/libz.dll.a"
"D:/msys64/mingw64/lib/libtiff.dll.a" "D:/msys64/mingw64/lib/libjpeg.dll.a"
"D:/msys64/mingw64/lib/libcairo-script-interpreter.dll.a" objs/
cp: will not overwrite just-created 'objs/libgobject-2.0.dll.a' with
'D:/msys64/mingw64/lib/libgobject-2.0.dll.a'
cp: will not overwrite just-created 'objs/libglib-2.0.dll.a' with
'D:/msys64/mingw64/lib/libglib-2.0.dll.a'

Turns out there are repeated input files:
subprojects/glib/gobject/libgobject-2.0.dll.a and
D:/msys64/mingw64/lib/libgobject-2.0.dll.a (and same for libglib-2.0.dll.a)

Removing D:/msys64/mingw64/lib/libgobject-2.0.dll.a and
D:/msys64/mingw64/lib/libglib-2.0.dll.a from the command-line fixed the issue!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu

2022-07-22 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29369

Matthias Klose  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #2 from Matthias Klose  ---
when trying to collect the object files, I couldn't reproduce this anymore
myself. Closing as invalid.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29392] [display html] Unexpected line format in summary file

2022-07-22 Thread ruud.vanderpas at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29392

Ruud van der Pas  changed:

   What|Removed |Added

Summary|[gp-display-html]   |[display html] Unexpected
   |Unexpected line format in   |line format in summary file
   |summary file|

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu

2022-07-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29369

--- Comment #3 from Alan Modra  ---
Were the toolchain and libraries exactly the same when you tried to reproduce
the fail?  If not, we might have a bug somewhere that only triggers once in a
blue moon.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29369] [2.39 Regression] ld: internal error ../../ld/ldlang.c 6452 on powerpc64le-linux-gnu

2022-07-22 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29369

--- Comment #4 from Matthias Klose  ---
no, I also updated the compiler once.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29083] The caller-callee view from the "gprofng display text" tool changes alignment

2022-07-22 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29083

Kurt Goebel  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29350] Incorrect function name assigned

2022-07-22 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29350

Kurt Goebel  changed:

   What|Removed |Added

 CC||kurt.goebel at oracle dot com
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gprofng/29015] On Intel Skylake the call tree is incorrect

2022-07-22 Thread kurt.goebel at oracle dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29015

Kurt Goebel  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29389] Failed assertions in bfd/cofflink.c and bfd/coff-x86_64.c during the linking stage (MSYS2 MinGW64)

2022-07-22 Thread luca.bacci at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #3 from Luca Bacci  ---
Created attachment 14225
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14225&action=edit
Bundle with all the object files and static library archives

Bundle containing all the needed object files and static library archives

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29389] Failed assertions in bfd/cofflink.c and bfd/coff-x86_64.c during the linking stage (MSYS2 MinGW64)

2022-07-22 Thread luca.bacci at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #4 from Luca Bacci  ---
To link the final executable:

x86_64-w64-mingw32-cc -o compose-parse.exe compose-parse.c.obj
"-Wl,--allow-shlib-undefined" "-Wl,--start-group" "libgtk.a" "libgtk_css.a"
"libglib-2.0.dll.a" "libgobject-2.0.dll.a" "libgio-2.0.dll.a"
"libgmodule-2.0.dll.a" "libgdk.a" "libgdk-win32.a" "libgsk.a" "libgsk_f16c.a"
"-Wl,-Bsymbolic" "system/libpangocairo-1.0.dll.a" "system/libpango-1.0.dll.a"
"system/libgobject-2.0.dll.a" "system/libglib-2.0.dll.a" "system/libintl.dll.a"
"system/libharfbuzz.dll.a" "system/libcairo.dll.a" "system/libfribidi.dll.a"
"system/libcairo-gobject.dll.a" "system/libgdk_pixbuf-2.0.dll.a"
"system/libepoxy.dll.a" "-lm" "system/libgraphene-1.0.dll.a"
"system/libpangowin32-1.0.dll.a" "-ladvapi32" "-lcomctl32" "-lcrypt32"
"-ldwmapi" "-limm32" "-lsetupapi" "-lwinmm" "system/libpangoft2-1.0.dll.a"
"system/libfontconfig.dll.a" "system/libfreetype.dll.a" "system/libpng16.dll.a"
"system/libz.dll.a" "system/libtiff.dll.a" "system/libjpeg.dll.a" "-lhid"
"system/libcairo-script-interpreter.dll.a" "-ladvapi32" "-lcomctl32"
"-lcrypt32" "-ldwmapi" "-limm32" "-lsetupapi" "-lwinmm" "-lhid"
"-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool"
"-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-Wl,--end-group"

It completes successfully on my Arch Linux box, but it fails on MSYS2 MINGW64.
Perhaps on Arch Linux the mingw-w64 toolchain does not use ld.bfd?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29389] Failed assertions in bfd/cofflink.c and bfd/coff-x86_64.c during the linking stage (MSYS2 MinGW64)

2022-07-22 Thread luca.bacci at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #5 from Luca Bacci  ---
Here's a backtrace when hitting the failed assertion in cofflink.c:2279

(gdb) bt
#0  _bfd_coff_link_input_bfd (flaginfo=0xfffb40, input_bfd=0xb3f2710)
at ../../binutils-gdb/bfd/cofflink.c:2283
#1  0x7ff71e814ee8 in _bfd_coff_final_link (abfd=0x4e662a0,
info=0x7ff71ead7880 ) at ../../binutils-gdb/bfd/cofflink.c:866
#2  0x7ff71e7b41fd in ldwrite () at ../../binutils-gdb/ld/ldwrite.c:545
#3  0x7ff71e7b0b8b in main (argc=79, argv=0x11b5890)
at ../../binutils-gdb/ld/ldmain.c:513

--

(gdb) bt -full
#0  _bfd_coff_link_input_bfd (flaginfo=0xfffb40, input_bfd=0xb3f2710)
at ../../binutils-gdb/bfd/cofflink.c:2283
a = 0
pos = 26247420
amt = 144
n_tmask = 48
n_btshft = 4
adjust_symndx = 0x0
output_bfd = 0x4e662a0
strings = 0x0
syment_base = 56846
copy = false
hash = true
isymesz = 18
osymesz = 18
linesz = 6
esym = 0x161193c0 '▒' 
esym_end = 0x161193c0 '▒' 
isymp = 0x112c3030
secpp = 0x10c51320
indexp = 0x10c47f58
output_index = 56952
outsym = 0x10c71060 ""
sym_hash = 0xb3dbec0
o = 0x0
__PRETTY_FUNCTION__ = "_bfd_coff_link_input_bfd"
#1  0x7ff71e814ee8 in _bfd_coff_final_link (abfd=0x4e662a0,
info=0x7ff71ead7880 ) at ../../binutils-gdb/bfd/cofflink.c:866
symesz = 18
flaginfo = {info = 0x7ff71ead7880 ,
  output_bfd = 0x4e662a0, failed = false, global_to_static = false,
  strtab = 0x10a91e50, section_info = 0x0, last_file_index = 55524,
  last_file = {_n = {_n_name = ".file\000\000", _n_n = {
_n_zeroes = 435610543662, _n_offset = 13451671603782742029},
  _n_nptr = {
0x656c69662e ,
0xbaadf00dbaadf00d }}, n_value = 55621, n_scnum = -2, n_flags = 61453, n_type =
0,
n_sclass = 103 'g', n_numaux = 1 '\001'}, last_bf_index = -1,
  last_bf = {x_sym = {x_tagndx = {l = 16776160, p = 0xfffbe0},
  x_misc = {x_lnsz = {x_lnno = 4236, x_size = 7807},
x_fsize = 511643788}, x_fcnary = {x_fcn = {
  x_lnnoptr = 82207392, x_endndx = {l = 48, p = 0x30}},
x_ary = {x_dimen = {25248, 1254, 0, 0}}}, x_tvndx = 52223},
x_file = {x_n = {
x_fname =
"▒▒▒\000\000\000\000\000▒\020\177\036▒\177\000\000▒b▒\004", x_n = {x_zeroes =
16776160, x_offset = 140699345293452}},
  x_ftype = 48 '0'}, x_scn = {x_scnlen = 16776160, x_nreloc = 0,
  x_nlinno = 0, x_checksum = 511643788, x_associated = 32759,
  x_comdat = 0 '\000'}, x_tv = {x_tvfill = 16776160, x_tvlen = 0,
  x_tvran = {0, 4236}}, x_csect = {x_scnlen = {l = 16776160,
p = 0xfffbe0}, x_parmhash = 511643788, x_snhash = 32759,
  x_smtyp = 0 '\000', x_smclas = 0 '\000', x_stab = 82207392,
  x_snstab = 0}, x_sect = {x_scnlen = 16776160, x_nreloc = 0}},
  debug_merge = {root = {table = 0x10c3eed0,
  newfunc = 0x7ff71e8132be <_bfd_coff_debug_merge_hash_newfunc>,
  memory = 0x1123bda0, size = 4051, count = 0, entsize = 32,
  frozen = 0}}, internal_syms = 0x112c1fa0,
  sec_ptrs = 0x10c50fd0, sym_indices = 0x10c47db0,
  outsyms = 0x10c70fd0 "0\001",
  linenos = 0xca80fe0 "`", '▒' , "▒▒▒",
  contents = 0x12255040 "\001", external_relocs = 0x10c5d090 "",
  internal_relocs = 0x10c90fa0}
debug_merge_allocated = true
long_section_names = true
o = 0x4e67540
p = 0x10b2da40
max_sym_count = 6161
max_lineno_count = 0
max_reloc_count = 3828
max_output_reloc_count = 0
max_contents_size = 1520608
rel_filepos = 25224192
relsz = 10
line_filepos = 25224192
linesz = 6
sub = 0xb3f2710
external_relocs = 0x0
strbuf = "\000\000\000"
amt = 91872
#2  0x7ff71e7b41fd in ldwrite () at ../../binutils-gdb/ld/ldwrite.c:545
No locals.
#3  0x7ff71e7b0b8b in main (argc=79, argv=0x11b5890)
at ../../binutils-gdb/ld/ldmain.c:513
emulation = 0x7ff71e96cd8d <__PRETTY_FUNCTION__.0+1277> "i386pep"
start_time = 0
(gdb)

--

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/20562] Linker aborting on line 444 in bfd_get_reloc_size

2022-07-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20562

Alan Modra  changed:

   What|Removed |Added

   Severity|critical|normal
 Resolution|--- |OBSOLETE
 Status|WAITING |RESOLVED

--- Comment #2 from Alan Modra  ---
Impossible with current bfd/reloc.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29389] Failed assertions in bfd/cofflink.c and bfd/coff-x86_64.c during the linking stage (MSYS2 MinGW64)

2022-07-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

--- Comment #6 from Alan Modra  ---
You are missing rather a lot of object files and libraries in that zip. 
Besides the libraries you specify with -l, there are also some objects and
libraries that your cc adds.  You can see those by adding -Wl,-v to the command
in comment #4, or perhaps more conveniently by adding -Wl,-t.

It is quite likely that those other objects and libraries are different between
your two systems, and why you say "It completes successfully on my Arch Linux
box, but it fails on MSYS2 MINGW64."

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/29389] Failed assertions in bfd/cofflink.c and bfd/coff-x86_64.c during the linking stage (MSYS2 MinGW64)

2022-07-22 Thread bergner at linux dot ibm.com
https://sourceware.org/bugzilla/show_bug.cgi?id=29389

Peter Bergner  changed:

   What|Removed |Added

 CC||bergner at linux dot ibm.com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29378] CTF test failures with GCC 12 and -O0

2022-07-22 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29378

H.J. Lu  changed:

   What|Removed |Added

  Component|libctf  |ld

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27998] relocation R_386_GOTOFF against STT_GNU_IFUNC symbol `foo' isn't supported

2022-07-22 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27998

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

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

commit 28067e797c50eaf33bf24619aea97d3350db69e5
Author: H.J. Lu 
Date:   Thu Jul 21 10:35:58 2022 -0700

i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC

We can't use the PLT entry as the function address for PIC since the PIC
register may not be set up properly for indirect call.

bfd/

PR ld/27998
* elf32-i386.c (elf_i386_relocate_section): Don't allow GOTOFF
relocation against IFUNC symbol for PIC.

ld/

PR ld/27998
* testsuite/ld-i386/pr27998a.d: Replace -shared with -e bar.
* testsuite/ld-i386/pr27998b.d: Expect a linker error.
* testsuite/ld-ifunc/ifunc-2-i386-now.d: Updated.
* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-i386.s: Replace @GOTOFF with @GOT.
* testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise.

(cherry picked from commit 8f29211c3f0a6335c17e0a90396c146facf6dba4)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27998] relocation R_386_GOTOFF against STT_GNU_IFUNC symbol `foo' isn't supported

2022-07-22 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27998

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

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

commit 5c0b4ee406035917d0e50aa138194fab57ae6bf8
Author: H.J. Lu 
Date:   Thu Jul 21 10:35:58 2022 -0700

i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC

We can't use the PLT entry as the function address for PIC since the PIC
register may not be set up properly for indirect call.

bfd/

PR ld/27998
* elf32-i386.c (elf_i386_relocate_section): Don't allow GOTOFF
relocation against IFUNC symbol for PIC.

ld/

PR ld/27998
* testsuite/ld-i386/pr27998a.d: Replace -shared with -e bar.
* testsuite/ld-i386/pr27998b.d: Expect a linker error.
* testsuite/ld-ifunc/ifunc-2-i386-now.d: Updated.
* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-i386.s: Replace @GOTOFF with @GOT.
* testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise.

(cherry picked from commit 8f29211c3f0a6335c17e0a90396c146facf6dba4)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/12291] "ld -r" doesn't work with mixed IR/non-IR objects

2022-07-22 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=12291

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/12291] "ld -r" doesn't work with mixed IR/non-IR objects

2022-07-22 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=12291

--- Comment #9 from Sam James  ---
(In reply to H.J. Lu from comment #8)
> (In reply to Nick Clifton from comment #7)
> > Hi H.J.
> > 
> > (In reply to H.J. Lu from comment #6)
> > 
> > > Here is the proposal:
> > 
> > > It has been moved at:
> > > 
> > > https://gitlab.com/x86-binutils/binutils-gdb/-/tree/users/hjl/lto-mixed/
> > > master
> > 
> > I like the proposal.
> > 
> > Do you think that the branch sources are ready for review and 
> > merging/pulling into mainline ?
> > 
> 
> Yes, I will submit a patch set.

Did anything happen w/ this? Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/12291] "ld -r" doesn't work with mixed IR/non-IR objects

2022-07-22 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=12291

--- Comment #10 from H.J. Lu  ---
https://sourceware.org/pipermail/binutils/2020-October/113795.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26792] Makefiles don't support GNU make job server

2022-07-22 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26792

--- Comment #4 from H.J. Lu  ---
*** Bug 12280 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/12280] Makefiles don't support LTO

2022-07-22 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=12280

H.J. Lu  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #1 from H.J. Lu  ---
Dup.

*** This bug has been marked as a duplicate of bug 26792 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/22831] ld causes massive thrashing if object files are not fully memory-resident: new algorithm needed

2022-07-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22831

Alan Modra  changed:

   What|Removed |Added

   Severity|critical|enhancement
 Status|WAITING |NEW
   Priority|P1  |P3

--- Comment #31 from Alan Modra  ---
Putting priority and severity back where they belong.

-- 
You are receiving this mail because:
You are on the CC list for the bug.