bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22150] New: [2.29 Regression] ld.bfd keeps a version reference i


From: doko at debian dot org
Subject: [Bug ld/22150] New: [2.29 Regression] ld.bfd keeps a version reference in .gnu.version_r for symbols which are optimized out
Date: Mon, 18 Sep 2017 13:33:32 +0000

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
0000000000000000      DF *UND*  0000000000000000  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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]