patches/binutils/2.18.50.0.8/120-check-ldrunpath-length.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Oct 14 21:30:27 2008 +0000 (2008-10-14)
changeset 935 e175e3538310
parent 652 bed1088fd34d
permissions -rw-r--r--
Introduce the notion of a 'sample comment'.

- presence of the sample's reported.by file is now mandatory.
- when saving a sample, reporter name & URL are queried, to avoid operator forget about creating the reported.by file.
- when saving a sample, one can store a few-liner comment.
- when recalling a sample, the reporter name, URL and comment (if present) are printed.
- update the powerpc-e500v2-linux-gnuspe sample to include Nate's comment (from his original mail).
- update all samples that were missing the reported.by file.

/trunk/scripts/saveSample.sh | 46 35 11 0 ++++++++++++++++++------
/trunk/scripts/showSamples.sh | 12 6 6 0 +++---
/trunk/samples/powerpc-e500v2-linux-gnuspe/reported.by | 15 15 0 0 ++++++++
/trunk/samples/samples.mk | 22 17 5 0 +++++++++--
4 files changed, 73 insertions(+), 22 deletions(-)
yann@652
     1
diff -durN binutils-2.18.50.0.8.orig/ld/emultempl/elf32.em binutils-2.18.50.0.8/ld/emultempl/elf32.em
yann@652
     2
--- binutils-2.18.50.0.8.orig/ld/emultempl/elf32.em	2008-07-10 17:33:23.000000000 +0200
yann@652
     3
+++ binutils-2.18.50.0.8/ld/emultempl/elf32.em	2008-07-13 23:19:29.000000000 +0200
yann@652
     4
@@ -1220,6 +1220,8 @@
yann@652
     5
 	      && command_line.rpath == NULL)
yann@652
     6
 	    {
yann@652
     7
 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
yann@652
     8
+	      if ((lib_path) && (strlen (lib_path) == 0))
yann@652
     9
+		  lib_path = NULL;
yann@652
    10
 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
yann@652
    11
 						      force))
yann@652
    12
 		break;
yann@652
    13
@@ -1405,6 +1407,8 @@
yann@652
    14
   rpath = command_line.rpath;
yann@652
    15
   if (rpath == NULL)
yann@652
    16
     rpath = (const char *) getenv ("LD_RUN_PATH");
yann@652
    17
+  if ((rpath) && (strlen (rpath) == 0))
yann@652
    18
+      rpath = NULL;
yann@652
    19
   if (! (bfd_elf_size_dynamic_sections
yann@652
    20
 	 (link_info.output_bfd, command_line.soname, rpath,
yann@652
    21
 	  command_line.filter_shlib,