[Bug ld/22150] New: [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

Bug ID: 22150
   Summary: [2.29 Regression] ld.bfd keeps a version reference in
.gnu.version_r for symbols which are optimized out
   Product: binutils
   Version: 2.29
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: doko at debian dot org
  Target Milestone: ---

[forwarded from https://launchpad.net/bugs/1715641]

test files at https://people.canonical.com/~doko/tmp/lp1715641.tar.xz

feel free to call that a regression or behavior change ;) ... This is seen when
building NetworkManager using ld 2.29 using glibc 2.26, the dpkg-shlibs tool
not seeing a versioned dependency on a glibc 2.26 symbol, and then the
packaging tools declaring NetworkManager be ready for use with glibc 2.24, and
then the dynamic loader complaining with 

# ldd /usr/sbin/NetworkManager
/usr/sbin/NetworkManager: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25'
not found (required by /usr/sbin/NetworkManager)

The behaviour change between ld 2.28 and ld 2.29 seems to be

$ readelf -V NetworkManager-ld-2.28 | fgrep GLIBC_2.25
$ readelf -V NetworkManager-ld-2.29 | fgrep GLIBC_2.25
  0x0170:   Name: GLIBC_2.25  Flags: none  Version: 11

$ readelf -V NetworkManager-gold-2.28 | fgrep GLIBC_2.25
  000:   0 (*local*)   2 (GLIBC_2.25)d (CURL_GNUTLS_3)   d
(CURL_GNUTLS_3)
  0x0010:   Name: GLIBC_2.25  Flags: none  Version: 2
$ readelf -V NetworkManager-gold-2.29 | fgrep GLIBC_2.25
  000:   0 (*local*)   2 (GLIBC_2.25)d (CURL_GNUTLS_3)   d
(CURL_GNUTLS_3)
  0x0010:   Name: GLIBC_2.25  Flags: none  Version: 2

$ objdump -T NetworkManager-ld-2.29|grep GLIBC_2.25
$ objdump -T NetworkManager-gold-2.29|grep GLIBC_2.25
  DF *UND*    GLIBC_2.25 
__explicit_bzero_chk

There is no behavior change in gold, and gold correctly marks the symbol as
undefined. ld-2.28 otoh is able to detect that the symbol isn't used, doesn't
emit a reference, but in 2.29 it keeps a reference in the .gnu.version_r
section. Is this expected behavior?

There is a bug in NetworkManager as well, as it defines a backup for the
explicit_bzero function which is new in glibc 2.25, but it fails to define that
for explicit_bzero_chk which is used when building with -D_FORTIFY_SOURCE.

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

--- Comment #1 from Matthias Klose  ---
seems to be not target specific

-- 
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 binutils/22148] Integer overflow in elf64-x86-64.c, binutils 2.29.1

2017-09-18 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22148

--- Comment #1 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=94670f6cf11fc29cc6db6814b38c4305d9bcac96

commit 94670f6cf11fc29cc6db6814b38c4305d9bcac96
Author: H.J. Lu 
Date:   Mon Sep 18 13:05:25 2017 -0700

Check error return from bfd_canonicalize_dynamic_reloc

Since bfd_canonicalize_dynamic_reloc returns -1 on error, check it in
_bfd_x86_elf_get_synthetic_symtab.

PR ld/22148
* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
return from bfd_canonicalize_dynamic_reloc.

-- 
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 binutils/22148] Integer overflow in elf64-x86-64.c, binutils 2.29.1

2017-09-18 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22148

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

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

commit e6ff33ca50c1180725dde11c84ee93fcdb4235ef
Author: H.J. Lu 
Date:   Mon Sep 18 13:05:25 2017 -0700

Check error return from bfd_canonicalize_dynamic_reloc

Since bfd_canonicalize_dynamic_reloc returns -1 on error, check it in
elf_i386_get_synthetic_symtab and elf_x86_64_get_synthetic_symtab.

PR ld/22148
* elf32-i386.c (elf_i386_get_synthetic_symtab): Check error
return from bfd_canonicalize_dynamic_reloc.
* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.

(cherry picked from commit 94670f6cf11fc29cc6db6814b38c4305d9bcac96)

-- 
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 binutils/22148] Integer overflow in elf64-x86-64.c, binutils 2.29.1

2017-09-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22148

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.30

--- Comment #3 from H.J. Lu  ---
Fixed for master and 2.29 branches.

-- 
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/21924] Test weakundef1 with PIE fails

2017-09-18 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21924

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

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

commit 00109687cb48c33965afbc6d821f3f0e3fec365c
Author: H.J. Lu 
Date:   Tue Aug 8 20:20:43 2017 -0700

ld: Require GCC 5 or above for 3 x86 tests

Require GCC 5 or above for 3 x86 tests which fail with GCC 4.9.3.

PR ld/21924
* testsuite/ld-i386/i386.exp: Require GCC 5 or above for
"weakundef1 with PIE" test.
* testsuite/ld-x86-64/tls.exp: Require GCC 5 or above for
"tlsdesc1" and "tlsdesc1 with PIE" tests.

(cherry picked from commit 25d28c91b89d8f4a7e78b98b01e2c2382cea3e60)

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #2 from H.J. Lu  ---
Is this against ld or gold?  If it is against ld, please provide a testcase
for ld, not for gold.  link.sh uses gold, not ld.

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

Matthias Klose  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #3 from Matthias Klose  ---
it is against ld. forgot to reset the link script after generating the binaries
with the four linker variants.

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

--- Comment #4 from H.J. Lu  ---
(In reply to Matthias Klose from comment #3)
> it is against ld. forgot to reset the link script after generating the
> binaries with the four linker variants.

It doesn't work with ld:

ld.bfd: warning: libpcre.so.3, needed by libglib-2.0.so.0, not found (try using
-rpath or -rpath-link)
ld.bfd: warning: libunistring.so.0, needed by libpsl.so.5, not found (try using
-rpath or -rpath-link)
ld.bfd: warning: librtmp.so.1, needed by libcurl-gnutls.so.4.4.0, not found
(try using -rpath or -rpath-link)
libglib-2.0.so.0: undefined reference to `pcre_fullinfo'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_sasl_bind@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_get_dn_ber@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to
`ber_sockbuf_add_io@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_unbind_ext@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_get_attribute_ber@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_SetBufferMS'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_parse_result@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Init'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Connect1'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_set_option@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_SetupURL'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_abandon_ext@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_msgfree@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_result@OPENLDAP_2.4_2'
libglib-2.0.so.0: undefined reference to `pcre_get_stringtable_entries'
libglib-2.0.so.0: undefined reference to `pcre_get_stringnumber'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_search_ext@OPENLDAP_2.4_2'
//lib64/libresolv.so.2: undefined reference to `__res_maybe_init@GLIBC_PRIVATE'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_get_option@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `ber_memfree@OPENLDAP_2.4_2'
libglib-2.0.so.0: undefined reference to `pcre_config'
libglib-2.0.so.0: undefined reference to `pcre_compile2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Write'
libgnutls.so.30: undefined reference to `nettle_secp_192r1@HOGWEED_4'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_memfree@OPENLDAP_2.4_2'
libglib-2.0.so.0: undefined reference to `pcre_free'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_pvt_url_scheme2proto@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_ConnectStream'
libselinux.so.1: undefined reference to `pcre_free_study'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_next_message@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Close'
libcurl-gnutls.so.4.4.0: undefined reference to `ber_free@OPENLDAP_2.4_2'
libglib-2.0.so.0: undefined reference to `pcre_exec'
libgnutls.so.30: undefined reference to `nettle_secp_224r1@HOGWEED_4'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_err2string@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_init_fd@OPENLDAP_2.4_2'
libselinux.so.1: undefined reference to `pcre_compile'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_msgtype@OPENLDAP_2.4_2'
libglib-2.0.so.0: undefined reference to `pcre_study'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Free'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_free_urldesc@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `ldap_url_parse@OPENLDAP_2.4_2'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Read'
libcurl-gnutls.so.4.4.0: undefined reference to `RTMP_Alloc'
libglib-2.0.so.0: undefined reference to `pcre_dfa_exec'
libselinux.so.1: undefined reference to `pcre_version'
libcurl-gnutls.so.4.4.0: undefined reference to
`ldap_first_message@OPENLDAP_2.4_2'

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #5 from Alan Modra  ---
The testcase needs -rpath=. to search . first for dependent libraries not
mentioned on the command line, and these libraries are missing:
libblkid.so.1
libgpg-error.so.0
libkrb5.so.3
libk5crypto.so.3
libcom_err.so.2
libkrb5support.so.0
libsasl2.so.2
libgssapi.so.3
libkeyutils.so.1
libheimntlm.so.0
libkrb5.so.26
libasn1.so.8
libhcrypto.so.4
libroken.so.18
libwind.so.0
libheimbase.so.1
libhx509.so.5
libsqlite3.so.0
libcrypt.so.1

If I use my Ubuntu 16.04 system libs for the above, then I see
./libgssapi_krb5.so.2: undefined reference to
`k5_os_mutex_unlock@krb5support_0_MIT'
./libgssapi_krb5.so.2: undefined reference to
`k5_os_mutex_init@krb5support_0_MIT'
./libgssapi_krb5.so.2: undefined reference to
`k5_os_mutex_lock@krb5support_0_MIT'
./libgssapi_krb5.so.2: undefined reference to `k5_once@krb5support_0_MIT'
./libgssapi_krb5.so.2: undefined reference to
`k5_os_mutex_destroy@krb5support_0_MIT'

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

--- Comment #6 from Matthias Klose  ---
sorry, I updated the test tarball.

Alan, this is artful (both release and proposed pockets enabled).

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

Alan Modra  changed:

   What|Removed |Added

 CC||ma...@linux-mips.org

--- Comment #7 from Alan Modra  ---
OK, so I can work around the missing symbols with --allow-shlib-undefined, and
reproduce the problem.  The changed behaviour is due to running
elf_gc_sweep_symbol after setting version refs.  ie. the fix for pr20828, git
commit 902e9fc76a.

With 2.29, __explicit_bzero_chk@@GLIBC_2.25 triggers the GLIBC_2.25 version
ref.  With 2.28 that symbol has dynindx set to -1 by elf_gc_sweep_symbol before
version refs are calculated.

-- 
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/10406] ld terminated with signal 11 [segmentation fault]

2017-09-18 Thread liuluping1 at huawei dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=10406

liuluping  changed:

   What|Removed |Added

 CC||liuluping1 at huawei 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/2729] ld terminated with signal 11 [Segmentation fault]

2017-09-18 Thread liuluping1 at huawei dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=2729

liuluping  changed:

   What|Removed |Added

 CC||liuluping1 at huawei 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/22152] New: ld terminated with signal 11 [Segmentation fault], core dumped

2017-09-18 Thread liuluping1 at huawei dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22152

Bug ID: 22152
   Summary: ld terminated with signal 11 [Segmentation fault],
core dumped
   Product: binutils
   Version: 2.24
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: liuluping1 at huawei dot com
  Target Milestone: ---

Created attachment 10421
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10421&action=edit
ld terminated with signal 11 [Segmentation fault], core dumped

I down gcc source code ,in the single libstdc++-v2 directory ,i want to use
myself lib replace libc.so to make a new libstdc++.so,but error happened!

collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped

environment:
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) 
Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux

command:
gcc -shared -fPIC  -nostdlib 
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o  .libs/compatibility.o
.libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o
.libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o
.libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o 
-Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a
../src/c++98/.libs/libc++98convenience.a
../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive 
-I/home/llp/gcc4.8.3cleantemp2/liblibos/musl/include -L/lib64 -llibos_posix
-llibos_config -llibos_kernel -llibos_arch -llibos_mem -llibos_mid -lpvirt 
-ldl -lpthread  /usr/lib/gcc/x86_64-linux-gnu/4.8/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o  -Wl,-O1
-Wl,-z -Wl,relro -Wl,--gc-sections -Wl,--version-script=libstdc++-symbols.ver  
-Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.good432

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) 
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-shared' '-fPIC' '-v' '-nostdlib' '-I'
'/home/llp/gcc4.8.3cleantemp2/liblibos/musl/include' '-L/lib64' '-o'
'.libs/libstdc++.so.good431' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id
--eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -shared -z relro -o
.libs/libstdc++.so.good431 -L/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/4.8
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o .libs/compatibility.o
.libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o
.libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o
.libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o --whole-archive
../libsupc++/.libs/libsupc++convenience.a
../src/c++98/.libs/libc++98convenience.a
../src/c++11/.libs/libc++11convenience.a 

[Bug ld/22152] ld terminated with signal 11 [Segmentation fault], core dumped

2017-09-18 Thread liuluping1 at huawei dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22152

liuluping  changed:

   What|Removed |Added

 Target||libstdc++.so
   Host||linux ubuntu
   ||gcc_4.8.3_source_code
   ||host_gcc_bin:gcc_4.8.4
  Build||myself_lib replace libc.so

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #8 from Alan Modra  ---
I think this can be fixed by running elf_gc_sweep_symbol before we calculate
version refs, but leaving it after version defs.

-- 
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/22152] ld terminated with signal 11 [Segmentation fault], core dumped

2017-09-18 Thread ppluzhnikov at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22152

Paul Pluzhnikov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ppluzhnikov at google dot com
 Resolution|--- |INVALID

--- Comment #1 from Paul Pluzhnikov  ---
You need to provide clear repro instructions.

"I replace libc.so and crash" doesn't allow anyone to reproduce it.

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


collect2: fatal error: ld terminated with signal 11 , during compilation of busybox

2017-09-18 Thread Valère Monseur

Hi,

I'm running archlinux with glibc 2.26, binutils 2.29 and gcc 7.2.0.
When compiling busybox (1.27.2, or 1.26.2), the build fails with the error:


Static linking against glibc, can't use --gc-sections
Trying libraries: crypt m
 Library crypt is not needed, excluding it
 Library m is needed, can't exclude it (yet)
Final link with: m
Output of:
gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition 
-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables 
-fno-asynchronous-unwind-tables -fno-builtin-printf -Os -static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a 
coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a 
networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o 
coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o 
networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o 
-Wl,--end-group -Wl,--start-group -lm -Wl,--end-group -Wl,--warn-common -Wl,-Map,busybox_unstripped.map -Wl,--verbose

==
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core 
dumped
compilation terminated.
GNU ld (GNU Binutils) 2.29
  Supported emulations:
   elf_x86_64
   elf32_x86_64
   elf_i386
   elf_iamcu
   i386linux
   elf_l1om
   elf_k1om
using internal linker script:


I've also tried building with the binutils snapshot 2.29.1 and I have the same 
error.
I've attached the full log of the build.

Anything special I should do about this?
Thanks
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s Config.in
#
# using defaults found in .config
#
  SPLIT   include/autoconf.h -> include/config/*
  GEN include/bbconfigopts.h
  GEN include/common_bufsiz.h
  HOSTCC  applets/usage
  GEN include/usage_compressed.h
  HOSTCC  applets/applet_tables
  GEN include/applet_tables.h include/NUM_APPLETS.h
  GEN include/applet_tables.h include/NUM_APPLETS.h
  CC  applets/applets.o
  LD  applets/built-in.o
  HOSTCC  applets/usage_pod
  LD  archival/built-in.o
  CC  archival/ar.o
  CC  archival/bbunzip.o
  CC  archival/bzip2.o
  CC  archival/cpio.o
  CC  archival/gzip.o
  CC  archival/lzop.o
  CC  archival/tar.o
  CC  archival/unzip.o
  AR  archival/lib.a
  LD  archival/libarchive/built-in.o
  CC  archival/libarchive/common.o
  CC  archival/libarchive/data_align.o
  CC  archival/libarchive/data_extract_all.o
  CC  archival/libarchive/data_extract_to_command.o
  CC  archival/libarchive/data_extract_to_stdout.o
  CC  archival/libarchive/data_skip.o
  CC  archival/libarchive/decompress_bunzip2.o
  CC  archival/libarchive/decompress_gunzip.o
  CC  archival/libarchive/decompress_uncompress.o
  CC  archival/libarchive/decompress_unlzma.o
  CC  archival/libarchive/decompress_unxz.o
  CC  archival/libarchive/filter_accept_all.o
  CC  archival/libarchive/filter_accept_list.o
  CC  archival/libarchive/filter_accept_reject_list.o
  CC  archival/libarchive/find_list_entry.o
  CC  archival/libarchive/get_header_ar.o
  CC  archival/libarchive/get_header_cpio.o
  CC  archival/libarchive/get_header_tar.o
  CC  archival/libarchive/header_list.o
  CC  archival/libarchive/header_skip.o
  CC  archival/libarchive/header_verbose_list.o
  CC  archival/libarchive/init_handle.o
  CC  archival/libarchive/lzo1x_1.o
  CC  archival/libarchive/lzo1x_1o.o
  CC  archival/libarchive/lzo1x_9x.o
  CC  archival/libarchive/lzo1x_d.o
  CC  archival/libarc

[Bug ld/21441] Unnecessary padding of .eh_frame section

2017-09-18 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=21441

--- Comment #10 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

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

commit 25516cc573ff3551a7ac0538e1d3de5811c7199e
Author: Alan Modra 
Date:   Tue Sep 19 13:22:49 2017 +0930

PowerPC64 stubs don't match calculated size

After the PR 21411 fix, the linker generated .eh_frame for ppc64 glink
can be edited by the generic code.  The sequence of events goes
something like:
1) Some object file adds .eh_frame aligned to 8, making the output
   .eh_frame aligned to at least 8, so linker generated .eh_frame FDE
   is padded to an 8 byte boundary.
2) All .eh_frame past the glink .eh_frame is garbage collected.
3) Generic code detects that last FDE (the glink .eh_frame) doesn't
   need to be padded to an 8 byte boundary, reducing size from 88 to
   84.
4) elf64-ppc.c check fails.

PR 21441
* elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
size.

-- 
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/22150] [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out

2017-09-18 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22150

--- Comment #9 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

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

commit 3d13f3e9bda5aada68915f5d958f731ae79ed41d
Author: Alan Modra 
Date:   Tue Sep 19 11:59:30 2017 +0930

PR22150, ld keeps a version reference for gc'd symbols

elf_gc_sweep_symbol should run after verdefs are calculated, since
the verdef code creates symbols for the versions.  However,
elf_gc_sweep_symbol needs to run before verrefs so as to not emit
useless verrefs for symbols that are gc'd.

I've also removed a _bfd_elf_link_renumber_dynsyms calls added by
Maciej after I fussed about it when reviewing.  On further examination
the call appears to be unnecessary.  Looking at renumber_dynsyms also
made me realize that the test to exclude .gnu.version has been wrong
since 2016-04-26 (git commit d5486c4372), so fix that too.

PR 22150
* elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
symbols before calculating verrefs.  Don't renumber dynsyms
after gc.  Exclude .gnu.version when zero or one dynsym.
Localize some vars and reindent.

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