2017-04-21 21:35:31 +02:00
|
|
|
From 4a5a8b983fb31a67f976e0dd9cf5e8580ef55098 Mon Sep 17 00:00:00 2001
|
2016-05-10 23:05:04 +02:00
|
|
|
From: Romain Naour <romain.naour@gmail.com>
|
2017-04-21 21:35:31 +02:00
|
|
|
Date: Fri, 21 Apr 2017 21:23:55 +0300
|
2016-05-10 23:05:04 +02:00
|
|
|
Subject: [PATCH] check-ldrunpath-length
|
|
|
|
|
|
|
|
[Romain: rebase on top of 2.26]
|
|
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
|
|
---
|
|
|
|
ld/emultempl/elf32.em | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
|
2017-04-21 21:35:31 +02:00
|
|
|
index d4837d0..937da8a 100644
|
2016-05-10 23:05:04 +02:00
|
|
|
--- a/ld/emultempl/elf32.em
|
|
|
|
+++ b/ld/emultempl/elf32.em
|
2017-04-21 21:35:31 +02:00
|
|
|
@@ -1460,6 +1460,8 @@ fragment <<EOF
|
2016-05-10 23:05:04 +02:00
|
|
|
&& command_line.rpath == NULL)
|
|
|
|
{
|
2017-04-21 21:35:31 +02:00
|
|
|
path = (const char *) getenv ("LD_RUN_PATH");
|
2017-04-24 15:21:54 +02:00
|
|
|
+ if ((path) && (strlen (path) == 0))
|
|
|
|
+ path = NULL;
|
2017-04-21 21:35:31 +02:00
|
|
|
if (path
|
|
|
|
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
|
2016-05-10 23:05:04 +02:00
|
|
|
break;
|
2017-04-21 21:35:31 +02:00
|
|
|
@@ -1737,6 +1739,8 @@ gld${EMULATION_NAME}_before_allocation (void)
|
2016-05-10 23:05:04 +02:00
|
|
|
rpath = command_line.rpath;
|
|
|
|
if (rpath == NULL)
|
|
|
|
rpath = (const char *) getenv ("LD_RUN_PATH");
|
|
|
|
+ if ((rpath) && (strlen (rpath) == 0))
|
2017-04-21 21:35:31 +02:00
|
|
|
+ rpath = NULL;
|
2016-05-10 23:05:04 +02:00
|
|
|
|
|
|
|
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
|
|
|
|
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
|
|
|
--
|
2017-04-21 21:35:31 +02:00
|
|
|
2.7.4
|
2016-05-10 23:05:04 +02:00
|
|
|
|