1 Author: Chris Chimelis <chris@debian.org>
2 Description: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
3 cases where -rpath isn't specified. (#151024)
4 --- a/ld/emultempl/elf32.em
5 +++ b/ld/emultempl/elf32.em
7 && command_line.rpath == NULL)
9 lib_path = (const char *) getenv ("LD_RUN_PATH");
10 + if ((lib_path) && (strlen (lib_path) == 0))
12 if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
16 rpath = command_line.rpath;
18 rpath = (const char *) getenv ("LD_RUN_PATH");
19 + if ((rpath) && (strlen (rpath) == 0))
22 for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
23 if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)