This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/21501] get-dynamic-info assertion incorrectly triggered for i686 on x86_64 : 'Assertion `info[DT_RPATH] == NULL' failed!'
- From: "jason.vas.dias at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 18 May 2017 14:49:02 +0000
- Subject: [Bug nptl/21501] get-dynamic-info assertion incorrectly triggered for i686 on x86_64 : 'Assertion `info[DT_RPATH] == NULL' failed!'
- Auto-submitted: auto-generated
- References: <bug-21501-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21501
--- Comment #6 from Jason Vas Dias <jason.vas.dias at gmail dot com> ---
$ egrep --color -i 'rpath|run_path|runpath|\-R|lib32' /tmp/ld-v.log
Configured with: /usr/os_src/gcc-5.4.0/configure --prefix=/usr
--libdir=/usr/lib64 --enable-shared --enable-languages=all --enable-bootstrap
--enable-multilib --with-cpu-64=haswell --with-cpu-32=atom
--with-arch-64=x86-64 --with-tune-64=haswell --with-arch-32=i686
--with-tune-32=atom --enable-targets=all --enable-threads=posix --enable-lto
--enable-serial-configure --enable-checking=release --with-gmp=/usr
--with-gmp-lib=/usr/lib64 --with-mpfr=/usr --with-mpfr-lib=/usr/lib64
--with-mpc=/usr --with-mpc-lib=/usr/lib64 --with-isl=/usr
--with-isl-lib=/usr/lib64 --with-cloog=/usr --with-cloog-lib=/usr/lib64
--with-gnu-ld --with-gnu-as --enable-linker-build-id
--disable-libunwind-exceptions --disable-nls
--enable-version-specific-runtime-libs --enable-__cxa_atexit
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--with-system-zlib --enable-java-home --with-arch-directory=x86_64
--disable-libjava-multilib --with-stage1-ldflags=-lstdc++
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
LIBRARY_PATH=/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib32/:/lib/../lib32/:/usr/lib/../lib32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/:/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/../../../:/lib/:/usr/lib/
/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/collect2 -plugin
/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/cc7dLqei.res --build-id --eh-frame-hdr -m
elf_i386 -shared -o /usr/build/linux/glibc-x86/elf/ld.so.new
-L/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/32
-L/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib32 -L/lib/../lib32
-L/usr/lib/../lib32 -L/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0
-L/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/lib
-L/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/../../.. --verbose -z combreloc -z
relro --hash-style=both -z defs /usr/build/linux/glibc-x86/elf/librtld.os
--version-script=/usr/build/linux/glibc-x86/ld.map -soname=ld-linux.so.2
-defsym=_begin=0
SEARCH_DIR("/usr/i386-linux-gnu/lib32");
SEARCH_DIR("/usr/x86_64-linux-gnu/lib32"); SEARCH_DIR("/usr/local/lib32");
SEARCH_DIR("/lib32"); SEARCH_DIR("/usr/lib32");
SEARCH_DIR("/usr/i386-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib");
SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
so there really is NO rpath setting going on.
That log was produced by gcc and ld both in verbose mode producing ld.so .
There is no evidence of anything that would create a DT_RPATH setting
on the ld or gcc command lines logged.
Hence, I have no option but to patch glibc locally to remove empty RPATH
settings:
$ gendiff glibc .2.25
diff -up glibc/elf/get-dynamic-info.h.2.25 glibc/elf/get-dynamic-info.h
--- glibc/elf/get-dynamic-info.h.2.25 2017-05-18 14:47:40.789374404 +0000
+++ glibc/elf/get-dynamic-info.h 2017-05-18 14:46:09.362254812 +0000
@@ -139,6 +139,12 @@ elf_get_dynamic_info (struct link_map *l
assert (info[DT_FLAGS] == NULL
|| (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0);
/* Flags must not be set for ld.so. */
+ if( (NULL != info[DT_RUNPATH]) &&
+ ('\0' == info[DT_RUNPATH])
+ ) info[DT_RUNPATH] = NULL;
+ if( (NULL != info[DT_RPATH]) &&
+ ('\0' == info[DT_RPATH])
+ ) info[DT_RPATH] = NULL;
assert (info[DT_RUNPATH] == NULL);
assert (info[DT_RPATH] == NULL);
#else
--
You are receiving this mail because:
You are on the CC list for the bug.