patches/binutils/2.24/300-012_check_ldrunpath_length.patch
changeset 3303 66028c54b89d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.24/300-012_check_ldrunpath_length.patch	Fri Feb 21 23:53:40 2014 -0800
     1.3 @@ -0,0 +1,21 @@
     1.4 +diff -durN binutils-2.22.orig/ld/emultempl/elf32.em binutils-2.22/ld/emultempl/elf32.em
     1.5 +--- binutils-2.22.orig/ld/emultempl/elf32.em	2011-11-21 10:29:39.000000000 +0100
     1.6 ++++ binutils-2.22/ld/emultempl/elf32.em	2011-12-14 19:52:12.880783238 +0100
     1.7 +@@ -1273,6 +1273,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 +@@ -1500,6 +1502,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 + 
    1.23 +   for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
    1.24 +     if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)