public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld
@ 2010-11-05 17:10 hjl.tools at gmail dot com
  2010-11-05 17:27 ` [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld hjl.tools at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-05 17:10 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: LTO plugin test failures with --wi th-plugin-ld=ld
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: davek@gcc.gnu.org


On Linux/x86-64, with binutils from CVS on 2010-11-05,
revision 166360 gave extra failures:

FAIL: gcc.dg/plugin/finish_unit-test-1.c -fplugin=./finish_unit_plugin.so (test
for excess errors)
FAIL: gcc.dg/plugin/finish_unit-test-1.c -fplugin=./finish_unit_plugin.so (test
for excess errors)
FAIL: gcc.dg/plugin/ggcplug-test-1.c -fplugin=./ggcplug.so (test for excess
errors)
FAIL: gcc.dg/plugin/ggcplug-test-1.c -fplugin=./ggcplug.so (test for excess
errors)
FAIL: gcc.dg/plugin/one_time-test-1.c -fplugin=./one_time_plugin.so (test for
excess errors)
FAIL: gcc.dg/plugin/one_time-test-1.c -fplugin=./one_time_plugin.so (test for
excess errors)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so (test for
excess errors)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so (test for
excess errors)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 15)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 15)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 19)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 19)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 20)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 20)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 21)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 21)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 22)
FAIL: gcc.dg/plugin/self-assign-test-1.c -fplugin=./selfassign.so  (test for
warnings, line 22)
FAIL: gcc.dg/plugin/self-assign-test-2.c -fplugin=./selfassign.so (test for
excess errors)
FAIL: gcc.dg/plugin/self-assign-test-2.c -fplugin=./selfassign.so (test for
excess errors)
FAIL: gcc.dg/plugin/start_unit-test-1.c -fplugin=./start_unit_plugin.so (test
for excess errors)
FAIL: gcc.dg/plugin/start_unit-test-1.c -fplugin=./start_unit_plugin.so (test
for excess errors)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so
(test for excess errors)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so
(test for excess errors)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line )
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line )
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line 16)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line 16)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line 7)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line 7)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line 7)
FAIL: g++.dg/plugin/attribute_plugin-test-1.C -fplugin=./attribute_plugin.so 
(test for warnings, line 7)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so (test for
excess errors)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so (test for
excess errors)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 10)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 10)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 14)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 14)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 18)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 18)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 19)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 19)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 24)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 24)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 50)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 50)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 50)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 50)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 50)
FAIL: g++.dg/plugin/dumb-plugin-test-1.C -fplugin=./dumb_plugin.so  (test for
warnings, line 50)
FAIL: g++.dg/plugin/header-plugin-test.C -fplugin=./header_plugin.so (test for
excess errors)
FAIL: g++.dg/plugin/header-plugin-test.C -fplugin=./header_plugin.so (test for
excess errors)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so (test
for excess errors)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so (test
for excess errors)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line )
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line )
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line 14)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line 14)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line 5)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line 5)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line 9)
FAIL: g++.dg/plugin/pragma_plugin-test-1.C -fplugin=./pragma_plugin.so  (test
for warnings, line 9)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so (test for
excess errors)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so (test for
excess errors)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 10)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 10)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 13)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 13)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 26)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 26)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 27)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 27)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 33)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 33)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 34)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 34)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 40)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 40)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 41)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 41)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 42)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 42)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 43)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 43)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 44)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 44)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 46)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 46)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 47)
FAIL: g++.dg/plugin/self-assign-test-1.C -fplugin=./selfassign.so  (test for
warnings, line 47)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so (test for
excess errors)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so (test for
excess errors)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 10)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 10)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 13)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 13)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 26)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 26)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 27)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 27)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 33)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 33)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 34)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 34)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 40)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 40)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 41)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 41)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 42)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 42)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 46)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 46)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 47)
FAIL: g++.dg/plugin/self-assign-test-2.C -fplugin=./selfassign.so  (test for
warnings, line 47)
FAIL: g++.dg/plugin/self-assign-test-3.C -fplugin=./selfassign.so (test for
excess errors)
FAIL: g++.dg/plugin/self-assign-test-3.C -fplugin=./selfassign.so (test for
excess errors)

Executing on host: /export/build/gnu/gcc-lto/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-lto/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/plugin/finish_unit-test-1.c 
-fplugin=./finish_unit_plugin.so -O -S  -m32 -o finish_unit-test-1.s   
(timeout = 300)
cc1: error: Fail to initialize plugin ./finish_unit_plugin.so^M
compiler exited with status 1

GCC is configured with

--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld  --enab
le-shared --enable-threads=posix --enable-haifa  --prefix=/usr/gcc-4.6.0
--with-
local-prefix=/usr/local --with-fpmath=sse --with-build-config=bootstrap-lto
--wi
th-plugin-ld=ld


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
@ 2010-11-05 17:27 ` hjl.tools at gmail dot com
  2010-11-05 17:44 ` davek at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-05 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|LTO plugin test failures    |LTO plugin test failures
                   |with --with-plugin-ld=ld    |with
                   |                            |--with-build-config=bootstr
                   |                            |ap-lto --with-plugin-ld=ld

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-05 17:27:27 UTC ---
Removing --with-build-config=bootstrap-lto seems to fix those failures.
--with-build-config=bootstrap-lto -with-plugin-ld=ld.gold works fine.
It looks like plugin support in BFD linker doesn't work with GCC plugin.


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
  2010-11-05 17:27 ` [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld hjl.tools at gmail dot com
@ 2010-11-05 17:44 ` davek at gcc dot gnu.org
  2010-11-05 22:59 ` davek at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-05 17:44 UTC (permalink / raw)
  To: gcc-bugs

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

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.05 17:44:25
         AssignedTo|unassigned at gcc dot       |davek at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Dave Korn <davek at gcc dot gnu.org> 2010-11-05 17:44:25 UTC ---
investigating, thanks for the report


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
  2010-11-05 17:27 ` [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld hjl.tools at gmail dot com
  2010-11-05 17:44 ` davek at gcc dot gnu.org
@ 2010-11-05 22:59 ` davek at gcc dot gnu.org
  2010-11-05 23:28 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-05 22:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dave Korn <davek at gcc dot gnu.org> 2010-11-05 22:59:04 UTC ---
When I tried running these tests in a pre-existing build tree,
plugin_default_version_check failed because the datestamps don't match up:

(gdb) p gcc_version[0]
$5 = {basever = 0x1029fe8 "4.6.0", datestamp = 0x1029fee "20101103",
  devphase = 0x1029ff7 "experimental", revision = 0x1143f30 "",
  configuration_arguments = 0xd2d2c0 "/n/10/davek/gcc/gcc/configure
--prefix=/n/
10/davek/gcc --with-mpfr=/opt/cfarm/mpfr-2.4.1 --with-gmp=/opt/cfarm/gmp-4.2.4
-
-with-mpc=/opt/cfarm/mpc-0.8 --with-libelf=/n/10/davek/usr --enable-bootstrap
".
..}
(gdb) p plugin_version[0]
$6 = {basever = 0x7ffff7567d29 "4.6.0",
  datestamp = 0x7ffff7567d2f "20101105",
  devphase = 0x7ffff7567d38 "experimental", revision = 0x7ffff7567e28 "",
  configuration_arguments = 0x7ffff7566720 "/n/10/davek/gcc/gcc/configure
--pref
ix=/n/10/davek/gcc --with-mpfr=/opt/cfarm/mpfr-2.4.1
--with-gmp=/opt/cfarm/gmp-4
.2.4 --with-mpc=/opt/cfarm/mpc-0.8 --with-libelf=/n/10/davek/usr
--enable-bootst
rap "...}
(gdb)

This will happen if $objdir/gcc/plugin-version.h or $objdir/gcc/configargs.h
has been regenerated for any reason in between building the compiler and
running the test.  Can you tell if this may have happened in your case?


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2010-11-05 22:59 ` davek at gcc dot gnu.org
@ 2010-11-05 23:28 ` hjl.tools at gmail dot com
  2010-11-05 23:30 ` hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-05 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-05 23:27:51 UTC ---
-fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1 miscompiled
selfassign.so. It generated:

[hjl@gnu-32 stage1-gcc]$ nm selfassign.so | grep plugin_init
00000000000009aa T plugin_init
[hjl@gnu-32 stage1-gcc]$ 

0000000000009aa <check_operator_eq>:
 9aa:   90                      nop 
 9ab:   90                      nop 
 9ac:   90                      nop 
 9ad:   90                      nop 
 9ae:   90                      nop 
 9af:   90                      nop 

Everything seems wrong. With gold as plugin linker, I got

[hjl@scel-amdbar2 gcc]$ nm selfassign.so | grep plugin_init
00000000000020ac T plugin_init
[hjl@scel-amdbar2 gcc]$ 

00000000000020ac <plugin_init>:
    20ac:       41 57                   push   %r15
    20ae:       41 56                   push   %r14
    20b0:       41 55                   push   %r13
    20b2:       41 54                   push   %r12
    20b4:       55                      push   %rbp
    20b5:       53                      push   %rbx
    20b6:       48 83 ec 38             sub    $0x38,%rsp
    20ba:       48 89 f0                mov    %rsi,%rax
    20bd:       4c 8b 2f                mov    (%rdi),%r13
    20c0:       44 8b 67 10             mov    0x10(%rdi),%r12d
    20c4:       48 8b 6f 18             mov    0x18(%rdi),%rbp
    20c8:       48 8d 35 11 1c 00 00    lea    0x1c11(%rip),%rsi        # 3ce0


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2010-11-05 23:28 ` hjl.tools at gmail dot com
@ 2010-11-05 23:30 ` hjl.tools at gmail dot com
  2010-11-05 23:31 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-05 23:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-05 23:30:36 UTC ---
Created attachment 22300
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22300
selfassign.so generated by bfd linker


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2010-11-05 23:30 ` hjl.tools at gmail dot com
@ 2010-11-05 23:31 ` hjl.tools at gmail dot com
  2010-11-05 23:33 ` davek at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-05 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-05 23:31:23 UTC ---
Created attachment 22301
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22301
selfassign.so generated by gold


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2010-11-05 23:31 ` hjl.tools at gmail dot com
@ 2010-11-05 23:33 ` davek at gcc dot gnu.org
  2010-11-08  4:53 ` davek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-05 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Dave Korn <davek at gcc dot gnu.org> 2010-11-05 23:33:29 UTC ---
(In reply to comment #4)

> Everything seems wrong. 

  Yes, you aren't exaggerating!  I am continuing to try and figure out what's
going wrong.


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2010-11-05 23:33 ` davek at gcc dot gnu.org
@ 2010-11-08  4:53 ` davek at gcc dot gnu.org
  2010-11-08  6:27 ` davek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-08  4:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Dave Korn <davek at gcc dot gnu.org> 2010-11-08 04:52:12 UTC ---
The generated source file selfassign.so.ltrans0.s (and hence also the object
file selfassign.so.ltrans0.ltrans.o) file which gets created when lto-plugin
invokes lto1 on the original input selfassign.o file has no contents.

This appears to be because plugin_init in selfassign.c isn't marked with
__attribute__((externally_visible)), and the resolution file marks it as
PREVAILING_DEF_IRONLY.  WPA then concludes that everything can be made static,
nothing is referenced, and discards the lot.

The consequence of this is that the object file that the pluging then adds back
into the link has no contents, so it doesn't override the symbol definitions
supplied from the IR when it first claimed the input selfassign.o file.  

It works with GOLD because GOLD thinks the plugin's external symbols are
PREVAILING_DEF, not PREVAILING_DEF_IRONLY.  This is the resolution file that
the lto-plugin writes based on what LD tells it at all_symbols_read time:

1
selfassign.o 27
5072 e2eb6ce9 PREVAILING_DEF_IRONLY plugin_init
5105 e2eb6ce9 UNDEF tree_check_failed
5114 e2eb6ce9 UNDEF tree_class_check_failed
5148 e2eb6ce9 UNDEF fancy_abort
5155 e2eb6ce9 UNDEF gimple_check_failed
5165 e2eb6ce9 UNDEF gimple_assign_single_p
5169 e2eb6ce9 UNDEF tree_contains_struct_check_failed
5253 e2eb6ce9 UNDEF build4_stat
5262 e2eb6ce9 UNDEF tree_operand_check_failed
5271 e2eb6ce9 UNDEF fold_build2_stat_loc
5279 e2eb6ce9 UNDEF build3_stat
5287 e2eb6ce9 UNDEF warning_at
5302 e2eb6ce9 UNDEF operand_equal_p
5308 e2eb6ce9 UNDEF maybe_get_identifier
5312 e2eb6ce9 UNDEF integer_zerop
5314 e2eb6ce9 UNDEF register_callback
5324 e2eb6ce9 UNDEF warning
5351 e2eb6ce9 UNDEF plugin_default_version_check
5494 e2eb6ce9 PREVAILING_DEF_IRONLY check_operator_eq
5536 e2eb6ce9 PREVAILING_DEF_IRONLY plugin_is_GPL_compatible
5433 e2eb6ce9 UNDEF tree_code_type
5442 e2eb6ce9 UNDEF tree_code_length
5452 e2eb6ce9 UNDEF gss_for_code_
5457 e2eb6ce9 UNDEF gimple_ops_offset_
5471 e2eb6ce9 UNDEF tree_contains_struct
5486 e2eb6ce9 UNDEF input_location
5502 e2eb6ce9 UNDEF cfun

... and here is the one generated when the plugin is loaded into GOLD:

1
selfassign.o 27
5072 e2eb6ce9 PREVAILING_DEF plugin_init
5105 e2eb6ce9 UNDEF tree_check_failed
5114 e2eb6ce9 UNDEF tree_class_check_failed
5148 e2eb6ce9 UNDEF fancy_abort
5155 e2eb6ce9 UNDEF gimple_check_failed
5165 e2eb6ce9 UNDEF gimple_assign_single_p
5169 e2eb6ce9 UNDEF tree_contains_struct_check_failed
5253 e2eb6ce9 UNDEF build4_stat
5262 e2eb6ce9 UNDEF tree_operand_check_failed
5271 e2eb6ce9 UNDEF fold_build2_stat_loc
5279 e2eb6ce9 UNDEF build3_stat
5287 e2eb6ce9 UNDEF warning_at
5302 e2eb6ce9 UNDEF operand_equal_p
5308 e2eb6ce9 UNDEF maybe_get_identifier
5312 e2eb6ce9 UNDEF integer_zerop
5314 e2eb6ce9 UNDEF register_callback
5324 e2eb6ce9 UNDEF warning
5351 e2eb6ce9 UNDEF plugin_default_version_check
5494 e2eb6ce9 PREVAILING_DEF check_operator_eq
5536 e2eb6ce9 PREVAILING_DEF plugin_is_GPL_compatible
5433 e2eb6ce9 UNDEF tree_code_type
5442 e2eb6ce9 UNDEF tree_code_length
5452 e2eb6ce9 UNDEF gss_for_code_
5457 e2eb6ce9 UNDEF gimple_ops_offset_
5471 e2eb6ce9 UNDEF tree_contains_struct
5486 e2eb6ce9 UNDEF input_location
5502 e2eb6ce9 UNDEF cfun


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2010-11-08  4:53 ` davek at gcc dot gnu.org
@ 2010-11-08  6:27 ` davek at gcc dot gnu.org
  2010-11-09 19:32 ` davek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-08  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Dave Korn <davek at gcc dot gnu.org> 2010-11-08 06:27:25 UTC ---
(In reply to comment #8)

> This appears to be because plugin_init in selfassign.c isn't marked with
> __attribute__((externally_visible)), and the resolution file marks it as
> PREVAILING_DEF_IRONLY.

> It works with GOLD because GOLD thinks the plugin's external symbols are
> PREVAILING_DEF, not PREVAILING_DEF_IRONLY.

Thanks to Ian T, I now have an understanding of why GOLD does this: it is
because if the ELF symbol visibility is STV_DEFAULT or STV_PROTECTED, GOLD
assumes it may be externally referenced, perhaps dynamically at runtime, so
doesn't resolve it _IRONLY.  I'll need to adjust GNU LD to match this
behaviour.

(Can't work around it just by tagging __attribute__((externally_visible)) onto
the definition of plugin_init in selfassign.c, because cc1 has been
lto-bootstrapped, and all the symbols that the plugin wants to reference have
been made static for the same reason - they are seen as IRONLY - so the plugin
can't resolve them and dlopen'ing it fails.)


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2010-11-08  6:27 ` davek at gcc dot gnu.org
@ 2010-11-09 19:32 ` davek at gcc dot gnu.org
  2010-11-10 18:01 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-09 19:32 UTC (permalink / raw)
  To: gcc-bugs

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

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                URL|                            |http://sourceware.org/ml/bi
                   |                            |nutils/2010-11/msg00170.htm
                   |                            |l

--- Comment #10 from Dave Korn <davek at gcc dot gnu.org> 2010-11-09 19:32:13 UTC ---
Binutils with the posted patch passes LTO-bootstrap using LD as the linker
plugin and resolves the failing tests.


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2010-11-09 19:32 ` davek at gcc dot gnu.org
@ 2010-11-10 18:01 ` hjl.tools at gmail dot com
  2010-11-10 22:53 ` davek at gcc dot gnu.org
  2010-11-11  1:47 ` hjl.tools at gmail dot com
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-10 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-10 18:01:19 UTC ---
I have verified that

http://sourceware.org/ml/binutils/2010-11/msg00170.html

fixes the problem.


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (10 preceding siblings ...)
  2010-11-10 18:01 ` hjl.tools at gmail dot com
@ 2010-11-10 22:53 ` davek at gcc dot gnu.org
  2010-11-11  1:47 ` hjl.tools at gmail dot com
  12 siblings, 0 replies; 14+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-10 22:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Dave Korn <davek at gcc dot gnu.org> 2010-11-10 22:52:55 UTC ---
(In reply to comment #11)
> I have verified that
> 
> http://sourceware.org/ml/binutils/2010-11/msg00170.html
> 
> fixes the problem.

Thanks HJ.  I can't self-approve patches to that code but I'll check it in just
as soon as I can, on the branch and head.  (I imagine you want to get on with a
linux-binutils release.)


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

* [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld
  2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
                   ` (11 preceding siblings ...)
  2010-11-10 22:53 ` davek at gcc dot gnu.org
@ 2010-11-11  1:47 ` hjl.tools at gmail dot com
  12 siblings, 0 replies; 14+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-11  1:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-11 01:46:40 UTC ---
(In reply to comment #12)
> (In reply to comment #11)
> > I have verified that
> > 
> > http://sourceware.org/ml/binutils/2010-11/msg00170.html
> > 
> > fixes the problem.
> 
> Thanks HJ.  I can't self-approve patches to that code but I'll check it in just
> as soon as I can, on the branch and head.  (I imagine you want to get on with a
> linux-binutils release.)

I have included your patch in the next Linux binutils. Thanks.


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

end of thread, other threads:[~2010-11-11  1:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-05 17:10 [Bug lto/46319] New: LTO plugin test failures with --wi th-plugin-ld=ld hjl.tools at gmail dot com
2010-11-05 17:27 ` [Bug lto/46319] LTO plugin test failures with --with-build-config=bootstrap-lto --with-plugin-ld=ld hjl.tools at gmail dot com
2010-11-05 17:44 ` davek at gcc dot gnu.org
2010-11-05 22:59 ` davek at gcc dot gnu.org
2010-11-05 23:28 ` hjl.tools at gmail dot com
2010-11-05 23:30 ` hjl.tools at gmail dot com
2010-11-05 23:31 ` hjl.tools at gmail dot com
2010-11-05 23:33 ` davek at gcc dot gnu.org
2010-11-08  4:53 ` davek at gcc dot gnu.org
2010-11-08  6:27 ` davek at gcc dot gnu.org
2010-11-09 19:32 ` davek at gcc dot gnu.org
2010-11-10 18:01 ` hjl.tools at gmail dot com
2010-11-10 22:53 ` davek at gcc dot gnu.org
2010-11-11  1:47 ` hjl.tools at gmail dot com

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