[Bug ld/23357] LD debug info cannot be read by valgrind

2018-07-10 Thread fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23357

Florian Weimer  changed:

   What|Removed |Added

 CC||fweimer at redhat 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 gold/23397] New: internal error in emit_relocs_scan gold/reloc.cc:518

2018-07-10 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23397

Bug ID: 23397
   Summary: internal error in emit_relocs_scan gold/reloc.cc:518
   Product: binutils
   Version: 2.32 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: hjl.tools at gmail dot com
CC: ian at airs dot com, skpgkp1 at gmail dot com
  Target Milestone: ---

On Linux/x86-64, most, if not all, of gold tests failed with -Wl,-q -flto:

`echo g++ -Wl,-q -DHAVE_CONFIG_H -I.
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite -I.. 
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/..
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../include
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../elfcpp -I..
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall-Wstack-usage=262144
-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2
-flto | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT tls_test.o -MD -MP
-MF .deps/tls_test.Tpo -c -o tls_test.o
/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/tls_test.cc
mv -f .deps/tls_test.Tpo .deps/tls_test.Po
`echo g++ -Wl,-q -DHAVE_CONFIG_H -I.
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite -I.. 
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/..
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../include
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../elfcpp -I..
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall-Wstack-usage=262144
-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2
-flto | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT tls_test_file2.o
-MD -MP -MF .deps/tls_test_file2.Tpo -c -o tls_test_file2.o
/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/tls_test_file2.cc
mv -f .deps/tls_test_file2.Tpo .deps/tls_test_file2.Po
`echo g++ -Wl,-q -DHAVE_CONFIG_H -I.
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite -I.. 
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/..
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../include
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../elfcpp -I..
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall-Wstack-usage=262144
-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2
-flto | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'` -MT tls_test_main.o -MD
-MP -MF .deps/tls_test_main.Tpo -c -o tls_test_main.o
/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/tls_test_main.cc
mv -f .deps/tls_test_main.Tpo .deps/tls_test_main.Po
`echo gcc -Wl,-q -DHAVE_CONFIG_H -I.
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite -I.. 
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/..
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../include
-I/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/../../elfcpp -I..
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -flto | sed -e
's/-Wp,-D_FORTIFY_SOURCE=[0-9[0-9]]*//'` -c -fopenmp -o tls_test_c.o
/export/gnu/import/git/sources/binutils-gdb/gold/testsuite/tls_test_c.c
g++ -Wl,-q -W -Wall-Wstack-usage=262144 -Werror -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -flto -Bgcctestdir/ -pthread
-static -static-libstdc++ -static-libgcc  -o tls_static_test tls_test.o
tls_test_file2.o tls_test_main.o tls_test_c.o  -ldl -ldl 
gcctestdir/ld: internal error in emit_relocs_scan, at
/export/gnu/import/git/sources/binutils-gdb/gold/reloc.cc:518
collect2: error: ld returned 1 exit status
make: *** [Makefile:4555: tls_static_test] Error 1

-- 
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/23394] Missing plug-in API support

2018-07-10 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23394

H.J. Lu  changed:

   What|Removed |Added

 CC||skpgkp1 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 ld/23350] multiple prevailing defs for unused variable in lto mode

2018-07-10 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23350

--- Comment #7 from H.J. Lu  ---
get_symbols has

if (!blhe)
{
  /* The plugin is called to claim symbols in an archive element
 from plugin_object_p.  But those symbols aren't needed to
 create output.  They are defined and referenced only within
 IR.  */

But there is no way to tell LTO plugin to drop this symbol.

-- 
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/23357] LD debug info cannot be read by valgrind

2018-07-10 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23357

Matthias Klose  changed:

   What|Removed |Added

 CC||doko at debian dot org

-- 
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/23394] New: Missing plug-in API support

2018-07-10 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23394

Bug ID: 23394
   Summary: Missing plug-in API support
   Product: binutils
   Version: 2.32 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

ld doesn't support

  LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS = 26, 
  LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27, 
  LDPT_GET_SYMBOLS_V3 = 28, 
  LDPT_GET_INPUT_SECTION_ALIGNMENT = 29, 
  LDPT_GET_INPUT_SECTION_SIZE = 30, 
  LDPT_REGISTER_NEW_INPUT_HOOK = 31, 
  LDPT_GET_WRAP_SYMBOLS = 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/23350] multiple prevailing defs for unused variable in lto mode

2018-07-10 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=23350

--- Comment #6 from Martin Liska  ---
Sorry for not precise reproducer. I was reducing that from an existing package
that normally succeeds w/o LTO.

So what about this:

$ cat main.i
int wrl;

int main ()
{
  return 0;
}

$ cat lib.i
int wrl;
void a() {}

$ gcc -c main.i && gcc -c lib.i && ar rusc lib.a lib.o && gcc main.o lib.a
lib.a

This works fine, however:

$ gcc -c -flto main.i && gcc -c -flto lib.i && ar rusc lib.a lib.o && gcc
main.o lib.a lib.a -flto --save-temps
lto1: fatal error: multiple prevailing defs for ‘a’
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: error:
lto-wrapper failed
collect2: error: ld returned 1 exit status

$ cat lib.res
3
main.o 2
198 5dfd76773c77e89 PREVAILING_DEF main
202 5dfd76773c77e89 PREVAILING_DEF_IRONLY wrl
lib.a@0x92 2
198 e65cc6ac1d79da7a PREVAILING_DEF_IRONLY a
202 e65cc6ac1d79da7a RESOLVED_IR wrl
lib.a@0x92 2
198 e65cc6ac1d79da7a PREVAILING_DEF_IRONLY a
202 e65cc6ac1d79da7a RESOLVED_IR wrl

Hope it's fine test-case?

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