patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
changeset 1614 3f76cdbceb6e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled	Tue Oct 27 20:06:46 2009 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +Don't generate RPATH if we're going to be generating RUNPATH.
     1.5 +
     1.6 +need to ponder what ramifications this has before enabling it
     1.7 +
     1.8 +--- binutils/bfd/elflink.c
     1.9 ++++ binutils/bfd/elflink.c
    1.10 +@@ -5382,11 +5382,15 @@
    1.11 + 
    1.12 + 	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
    1.13 + 				      TRUE);
    1.14 +-	  if (indx == (bfd_size_type) -1
    1.15 +-	      || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
    1.16 ++	  if (indx == (bfd_size_type) -1)
    1.17 + 	    return FALSE;
    1.18 + 
    1.19 +-	  if  (info->new_dtags)
    1.20 ++	  if (!info->new_dtags)
    1.21 ++	    {
    1.22 ++	      if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
    1.23 ++		return FALSE;
    1.24 ++	    }
    1.25 ++	  else
    1.26 + 	    {
    1.27 + 	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
    1.28 + 	      if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))