public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format
@ 2010-11-16 16:36 ro at gcc dot gnu.org
  2010-11-17 11:43 ` [Bug lto/46502] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2010-11-16 16:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46502

           Summary: collect2 LTO marker detection is fragile wrt. to nm
                    output format
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org


When investigating why some users of GCC mainline on Solaris 2 saw more
LTO-related testsuite failures than I, it turned out that collect2 calls some
version of nm to search the object's symbol tables for __gnu_lto_v1.
Unfortunately, this relies on the output format produced by GNU nm -n, and
silently fails if the format is different (i.e. the LTO markers aren't found
and lto1 isn't called).  I noticed this change between Solaris 10 (where I had
no instance of GNU nm in PATH, neither as nm nor as gnm) and Solaris 11 (where
there's /usr/bin/gnm in the default PATH).

This is very fragile, hard to find, and the requirement isn't even documented.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug lto/46502] collect2 LTO marker detection is fragile wrt. to nm output format
  2010-11-16 16:36 [Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format ro at gcc dot gnu.org
@ 2010-11-17 11:43 ` rguenth at gcc dot gnu.org
  2011-11-25 16:39 ` gseanmcg at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-17 11:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46502

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-17 11:41:11 UTC ---
The marker should be removed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug lto/46502] collect2 LTO marker detection is fragile wrt. to nm output format
  2010-11-16 16:36 [Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format ro at gcc dot gnu.org
  2010-11-17 11:43 ` [Bug lto/46502] " rguenth at gcc dot gnu.org
@ 2011-11-25 16:39 ` gseanmcg at gmail dot com
  2012-05-07 12:00 ` rguenth at gcc dot gnu.org
  2021-08-25 23:42 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gseanmcg at gmail dot com @ 2011-11-25 16:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46502

--- Comment #2 from Sean McGovern <gseanmcg at gmail dot com> 2011-11-25 16:32:47 UTC ---
(In reply to comment #0)
> When investigating why some users of GCC mainline on Solaris 2 saw more
> LTO-related testsuite failures than I, it turned out that collect2 calls some
> version of nm to search the object's symbol tables for __gnu_lto_v1.
> Unfortunately, this relies on the output format produced by GNU nm -n, and
> silently fails if the format is different (i.e. the LTO markers aren't found
> and lto1 isn't called).  I noticed this change between Solaris 10 (where I had
> no instance of GNU nm in PATH, neither as nm nor as gnm) and Solaris 11 (where
> there's /usr/bin/gnm in the default PATH).
> This is very fragile, hard to find, and the requirement isn't even documented.

Hi Rainer,

Has this been handled yet?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug lto/46502] collect2 LTO marker detection is fragile wrt. to nm output format
  2010-11-16 16:36 [Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format ro at gcc dot gnu.org
  2010-11-17 11:43 ` [Bug lto/46502] " rguenth at gcc dot gnu.org
  2011-11-25 16:39 ` gseanmcg at gmail dot com
@ 2012-05-07 12:00 ` rguenth at gcc dot gnu.org
  2021-08-25 23:42 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-07 12:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46502

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-07
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 11:57:34 UTC ---
Confirmed.  This issue is still present - even the LTO linker plugin identifies
files via that mechanism :/

Looks like simple things "stick" ...

libiberties simple-object could be used to instead query for a
.gnu.lto_.opts section.

The collect2 issue might eventually be "fixed" by making LTO require using
the linker-plugin path.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug lto/46502] collect2 LTO marker detection is fragile wrt. to nm output format
  2010-11-16 16:36 [Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-05-07 12:00 ` rguenth at gcc dot gnu.org
@ 2021-08-25 23:42 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-25 23:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46502

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.0
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed since GCC 9 and r9-5042.

As for binutils/plugin, https://sourceware.org/bugzilla/show_bug.cgi?id=24768 .

So closing this as fixed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-25 23:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 16:36 [Bug lto/46502] New: collect2 LTO marker detection is fragile wrt. to nm output format ro at gcc dot gnu.org
2010-11-17 11:43 ` [Bug lto/46502] " rguenth at gcc dot gnu.org
2011-11-25 16:39 ` gseanmcg at gmail dot com
2012-05-07 12:00 ` rguenth at gcc dot gnu.org
2021-08-25 23:42 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).