patches/binutils/2.17.50.0.18/300-012_check_ldrunpath_length.patch
changeset 325 58e56ab91bd0
parent 314 60a7282ec3c4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.17.50.0.18/300-012_check_ldrunpath_length.patch	Sun Aug 12 08:05:57 2007 +0000
     1.3 @@ -0,0 +1,21 @@
     1.4 +diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em
     1.5 +--- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em	2007-06-18 19:31:40.000000000 +0200
     1.6 ++++ binutils-2.17.50.0.17/ld/emultempl/elf32.em	2007-06-25 10:01:25.000000000 +0200
     1.7 +@@ -1007,6 +1007,8 @@
     1.8 + 	      && command_line.rpath == NULL)
     1.9 + 	    {
    1.10 + 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
    1.11 ++	      if ((lib_path) && (strlen (lib_path) == 0))
    1.12 ++		  lib_path = NULL;
    1.13 + 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
    1.14 + 						      force))
    1.15 + 		break;
    1.16 +@@ -1191,6 +1193,8 @@
    1.17 +   rpath = command_line.rpath;
    1.18 +   if (rpath == NULL)
    1.19 +     rpath = (const char *) getenv ("LD_RUN_PATH");
    1.20 ++  if ((rpath) && (strlen (rpath) == 0))
    1.21 ++      rpath = NULL;
    1.22 +   if (! (bfd_elf_size_dynamic_sections
    1.23 + 	 (output_bfd, command_line.soname, rpath,
    1.24 + 	  command_line.filter_shlib,