Index: ld/emultempl/elf32.em =================================================================== --- ld/emultempl/elf32.em.orig 2017-03-02 09:23:54.000000000 +0100 +++ ld/emultempl/elf32.em 2017-03-30 13:06:06.406399958 +0200 @@ -1581,8 +1581,35 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != else ELF_INTERPRETER_SET_DEFAULT= fi + + libpath_nl=`echo ${NATIVE_LIB_DIRS// /\\\n}` fragment < rpath) + cw[-1] = 0; + + *cw = 0; + } + else + { + while (*cr && *cr != ':') + cr++; + if (*cr == ':') + cr++; + } + } + if (*rpath == '\0') + { + free (rpath); + rpath = NULL; + } + } + } for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)