[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-15 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-15 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #28 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=2219ae0b0ebe14373850b000c2abaa31dab1d741 commit 2219ae0b0ebe14373850b000c2abaa3

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-15 Thread freddy77 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #29 from Frediano Ziglio --- Wonderful! Some question: - why not adding a test based on the code from Martin? - is this fix not similar to a previous issue (PR 23958, PR 23818, PR 23309, PR 22983, PR 22751, PR 22502, PR 0, PR

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-15 Thread freddy77 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #27 from Frediano Ziglio --- I compiled 2.32 version with the patch provided under Fedora 29 and the initial issue disappeared. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-15 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #26 from Martin Liška --- (In reply to H.J. Lu from comment #25) > Created attachment 11681 [details] > A patch > > Please try this. Good job H.J. I can confirm it works for a simple test-case and I see: 737 54db81cc670131ad PREV

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #25 from H.J. Lu --- Created attachment 11681 --> https://sourceware.org/bugzilla/attachment.cgi?id=11681&action=edit A patch Please try this. -- You are receiving this mail because: You are on the CC list for the bug. ___

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 H.J. Lu changed: What|Removed |Added Status|WAITING |NEW Version|unspecified

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-12 Thread freddy77 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #24 from Frediano Ziglio --- Just update binutils on Fedora 29 to 2.32 and compiled the small program at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81879, still crash, wine: Unhandled page fault on execute access to 0x a

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-12 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #23 from Martin Liška --- (In reply to H.J. Lu from comment #22) > Works for me with binutils 2.32: > Have you tried to run the binary with wine? You'll probably see something like: wine: Unhandled page fault on read access to 0x

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #22 from H.J. Lu --- Works for me with binutils 2.32: [hjl@gnu-cfl-2 pr24267]$ cat x.ii namespace std { template struct char_traits; template > class basic_ostream; typedef basic_ostream b; class ios_base { public: class Init

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-11 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #21 from Martin Liška --- (In reply to H.J. Lu from comment #20) > (In reply to Martin Liška from comment #19) > > H.J. : Can you please help me how to find a place which makes a real > > decision about which BFD (object) will be u

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-10 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #20 from H.J. Lu --- (In reply to Martin Liška from comment #19) > H.J. : Can you please help me how to find a place which makes a real > decision about which BFD (object) will be used for each symbol? Is there a way to easily rep

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-06 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #19 from Martin Liška --- H.J. : Can you please help me how to find a place which makes a real decision about which BFD (object) will be used for each symbol? -- You are receiving this mail because: You are on the CC list for the

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-03-01 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #18 from Martin Liška --- > I meant it must be PREVAILING_DEF and can't be PREVAILING_DEF_IRONLY. Yes, PREVAILING_DEF would be fine as well for COFF. -- You are receiving this mail because: You are on the CC list for the bug. __

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #17 from H.J. Lu --- (In reply to H.J. Lu from comment #16) > (In reply to Martin Liška from comment #15) > > Yes, both return: > > > > ... > > 262 545ca41eb4de6c9c PREVAILING_DEF _ZNKSt5ctypeIcE8do_widenEc > > Since it is refere

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #16 from H.J. Lu --- (In reply to Martin Liška from comment #15) > Yes, both return: > > ... > 262 545ca41eb4de6c9c PREVAILING_DEF _ZNKSt5ctypeIcE8do_widenEc Since it is referenced from istream-inst.o, it must be _ZNKSt5ctypeIcE8

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #15 from Martin Liška --- Yes, both return: ... 262 545ca41eb4de6c9c PREVAILING_DEF _ZNKSt5ctypeIcE8do_widenEc -- You are receiving this mail because: You are on the CC list for the bug. _

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #14 from H.J. Lu --- (In reply to Martin Liška from comment #13) > > > > What do ELF linkers (gold and bfd) get? > > We get: > > (gdb) p owner_sec->owner->filename > $5 = 0x69ae80 "main.o (symbol from plugin)" Do gold and bfd g

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #13 from Martin Liška --- > > What do ELF linkers (gold and bfd) get? We get: (gdb) p owner_sec->owner->filename $5 = 0x69ae80 "main.o (symbol from plugin)" -- You are receiving this mail because: You are on the CC list for th

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #12 from H.J. Lu --- (In reply to Martin Liška from comment #11) > I've got a patch candidate that can solve it: > > diff --git a/bfd/coffgen.c b/bfd/coffgen.c > index 309e1249ac..1d200b066b 100644 > --- a/bfd/coffgen.c > +++ b/bf

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-28 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #11 from Martin Liška --- I've got a patch candidate that can solve it: diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 309e1249ac..1d200b066b 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -2678,9 +2678,9 @@ _bfd_coff_section

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-27 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #10 from Martin Liška --- > I don't understand much the details but I think what H.J. Lu was trying to > say is that maybe was fixed for ELF but not for PE/COFF so to have a look at > the mentioned PRs. > I cannot suggest any of th

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-27 Thread freddy77 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 Frediano Ziglio changed: What|Removed |Added CC||freddy77 at gmail dot com --- Comme

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-27 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 Martin Liška changed: What|Removed |Added CC||eliz at gnu dot org -- You are receiv

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-27 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 Martin Liška changed: What|Removed |Added CC||eliz at gnu dot org -- You are receiv

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-26 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #8 from Martin Liška --- (In reply to H.J. Lu from comment #7) > (In reply to Martin Liška from comment #6) > > > > > > Not regression. They are LTO bug fixes. > > > > Can you be please more concrete? > > Check PR 23958, PR 238

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-26 Thread hp at tmm dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 hp at tmm dot cx changed: What|Removed |Added CC||hp at tmm dot cx -- You are recei

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #7 from H.J. Lu --- (In reply to Martin Liška from comment #6) > > > > Not regression. They are LTO bug fixes. > > Can you be please more concrete? Check PR 23958, PR 23818, PR 23309, PR 22983, PR 22751, PR 22502, PR 0, PR

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 Martin Liška changed: What|Removed |Added CC||dave.korn.cygwin at gmail dot com,

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #5 from H.J. Lu --- (In reply to Martin Liška from comment #4) > (In reply to H.J. Lu from comment #3) > > (In reply to Martin Liška from comment #2) > > > (In reply to H.J. Lu from comment #1) > > > > Does it happen on Linux? > >

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #4 from Martin Liška --- (In reply to H.J. Lu from comment #3) > (In reply to Martin Liška from comment #2) > > (In reply to H.J. Lu from comment #1) > > > Does it happen on Linux? > > > > No, it's specific to w64-mingw32 target.

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #3 from H.J. Lu --- (In reply to Martin Liška from comment #2) > (In reply to H.J. Lu from comment #1) > > Does it happen on Linux? > > No, it's specific to w64-mingw32 target. I'm testing that on Linux where I > use cross compile

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 H.J. Lu changed: What|Removed |Added CC||hjl.tools at gmail dot com -- You are rece

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #2 from Martin Liška --- (In reply to H.J. Lu from comment #1) > Does it happen on Linux? No, it's specific to w64-mingw32 target. I'm testing that on Linux where I use cross compiler + wine: $ wine --version wine-4.1 -- You ar

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|

[Bug ld/24267] ld discards a symbol with -flto and -static

2019-02-25 Thread marxin.liska at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 Martin Liška changed: What|Removed |Added Summary|ld discard a symbol with|ld discards a symbol with