http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
Bug ID: 60465 Summary: Compiling glibc-2.17,2.18 with gcc-4.8.2 and binutils-2.23.2,2.24 results in segfaults in _start / elf_get_dynamic_info Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: devurandom at gmx dot net Created attachment 32309 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32309&action=edit backtrace (glibc-2.18,binutils-2.24,gcc-4.8.2) I tried to build glibc-2.17 and 2.18 with binutils-2.23.2 or 2.24 and gcc-4.8.2, but always run into the same segfault when loading programs with the new runtime linker. Please find a backtrace for the glibc-2.18, binutils-2.24, gcc-4.8.2 combination attached. It crashes in exactly the same way when running without --library-path and when running with ../usr/bin/locale (from glibc-2.18) or /bin/date as argument. Since glibc-2.17 compiled fine with gcc-4.7.3, I assume that gcc-4.8.2 is to blame. The context of the crash is (according to glibc-2.18/elf/get-dynamic-info.h): elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) { ElfW(Dyn) **info; info = l->l_info; info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn; } GDB reports this function being called as: elf_get_dynamic_info (temp=0x0, l=0x2000000800051458 <_rtld_local+2456>) What I find to be suspicious is the changed order of parameters. I would like to check this with valgrind, too, but it is not available on ia64 (i.e. anything but x86, ppc and arm). See-Also: https://bugs.gentoo.org/show_bug.cgi?id=503838