1 From 65fb7a33aba30dec8690e0a237efaa3b9649154c Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Mon, 2 Mar 2015 01:27:17 +0000
4 Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
6 for cases where -rpath isn't specified. debian (#151024)
8 Upstream-Status: Pending
10 Signed-off-by: Chris Chimelis <chris@debian.org>
11 Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 ld/emultempl/elf32.em | 4 ++++
14 1 file changed, 4 insertions(+)
16 --- a/ld/emultempl/elf32.em
17 +++ b/ld/emultempl/elf32.em
18 @@ -1470,6 +1470,8 @@ fragment <<EOF
19 && command_line.rpath == NULL)
21 path = (const char *) getenv ("LD_RUN_PATH");
22 + if ((path) && (strlen (path) == 0))
25 && gld${EMULATION_NAME}_search_needed (path, &n, force))
27 @@ -1745,6 +1747,8 @@ gld${EMULATION_NAME}_before_allocation (
28 rpath = command_line.rpath;
30 rpath = (const char *) getenv ("LD_RUN_PATH");
31 + if ((rpath) && (strlen (rpath) == 0))
34 for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
35 if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)