Bug 1452574

Summary: elf/tst-audit set of tests fails with error "no PLTREL found in object ld-linux-x86-64.so.2"
Product: Red Hat Developer Toolset Reporter: Nick Clifton <nickc>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: high Docs Contact:
Priority: urgent    
Version: DTS 7.0 RHEL 7CC: ashankar, bgollahe, fweimer, glibc-bugzilla, kanderso, law, mcermak, mnewsome, mpolacek, mprchlik, nickc, pfrankli, qe-baseos-tools-bugs, skolosov
Target Milestone: alpha   
Target Release: 7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-7-binutils-2.28-1.el7 Doc Type: Bug Fix
Doc Text:
As an optimization, binutils previously ceased to generate Procedure Linkage Table (PLT) entries for executables for the 32-bit and 64-bit Intel architectures when a GOT entry was sufficient. As a consequence, tools using the PLT entries failed to work with the produced executables. In addition, the LD_AUDIT system feature for modifying the system's behaviour when loading binaries also failed to work. With this update, the optimization has been reverted, and the described problems no longer occur.
Story Points: ---
Clone Of: 1452111
: 1454326 (view as bug list) Environment:
Last Closed: 2017-10-24 09:44:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1445781, 1452111, 1452112, 1452151, 1452154, 1452577, 1454328    
Bug Blocks: 1454326    

Comment 3 Nick Clifton 2017-05-22 10:46:03 UTC
Fixed in:

 binutils-2.27-12.el7.1

Comment 6 Nick Clifton 2017-05-30 12:27:01 UTC
Hi Lenka,

  Looks good to me.

Cheers
  Nick

Comment 11 Miloš Prchlík 2017-10-05 21:46:41 UTC
Again, after some shuffling with files and patching glibc' test suite, I think it provides the expected result:

gcc tst-audit1.c -c -std=gnu99 -fgnu89-inline  -DNDEBUG -O3 -Wall -Winline -Wwrite-strings -fasynchronous-unwind-tables -fmerge-all-constants -fno-asynchronous-unwind-tables -frounding-math -g -mtune=generic -Wstrict-prototypes -Werror=implicit-function-declaration   -fno-tree-loop-distribute-patterns       -I../include -I/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf -I/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../rtkaio/sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../rtkaio/sysdeps/pthread -I../sysdeps/pthread -I../rtkaio/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../rtkaio/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../rtkaio/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I../ports -I../nptl -I../rtkaio  -I.. -I../libio -I. -nostdinc -isystem /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/include -isystem /usr/include  -D_LIBC_REENTRANT -include /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/libc-modules.h -DMODULE_NAME=nonlib -include ../include/libc-symbols.h       -o /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1.o -MD -MP -MF /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1.o.dt -MT /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1.o
gcc -nostdlib -nostartfiles -o /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1  -Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2   -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/csu/crt1.o /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/csu/crti.o `gcc  --print-file-name=crtbegin.o` /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1.o /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/support/libsupport_nonshared.a  -Wl,-rpath-link=/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/math:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/dlfcn:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/nss:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/nis:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/rt:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/resolv:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/crypt:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/support:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/nptl /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/libc.so.6 /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/libc_nonshared.a -Wl,--as-needed /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/ld.so -Wl,--no-as-needed -lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `gcc  --print-file-name=crtend.o` /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/csu/crtn.o
env GCONV_PATH=/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/iconvdata LOCPATH=/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/localedata LC_ALL=C LD_AUDIT=/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-auditmod1.so  /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/ld-linux-x86-64.so.2 --library-path /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/math:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/dlfcn:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/nss:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/nis:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/rt:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/resolv:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/crypt:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/support:/root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/nptl /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1  > /root/rpmbuild/BUILD/glibc-2.17-c758a686/build-x86_64-redhat-linux/elf/tst-audit1.out


Verified with build devtoolset-7-binutils-2.28-8.el7

Comment 13 errata-xmlrpc 2017-10-24 09:44:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3007

Comment 14 Nick Clifton 2017-10-31 16:11:10 UTC
*** Bug 1452111 has been marked as a duplicate of this bug. ***