patches/binutils/2.20/180-only-use-new-ld-dtags.patch.disabled
author Remy Bohmer <linux@bohmer.net>
Thu May 27 23:18:19 2010 +0200 (2010-05-27)
changeset 2060 51e4597b07fc
permissions -rw-r--r--
scripts: add option to strip all toolchain executables

To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
yann@1614
     1
Don't generate RPATH if we're going to be generating RUNPATH.
yann@1614
     2
yann@1614
     3
need to ponder what ramifications this has before enabling it
yann@1614
     4
yann@1614
     5
--- binutils/bfd/elflink.c
yann@1614
     6
+++ binutils/bfd/elflink.c
yann@1614
     7
@@ -5382,11 +5382,15 @@
yann@1614
     8
 
yann@1614
     9
 	  indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
yann@1614
    10
 				      TRUE);
yann@1614
    11
-	  if (indx == (bfd_size_type) -1
yann@1614
    12
-	      || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
yann@1614
    13
+	  if (indx == (bfd_size_type) -1)
yann@1614
    14
 	    return FALSE;
yann@1614
    15
 
yann@1614
    16
-	  if  (info->new_dtags)
yann@1614
    17
+	  if (!info->new_dtags)
yann@1614
    18
+	    {
yann@1614
    19
+	      if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
yann@1614
    20
+		return FALSE;
yann@1614
    21
+	    }
yann@1614
    22
+	  else
yann@1614
    23
 	    {
yann@1614
    24
 	      _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
yann@1614
    25
 	      if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))