summaryrefslogtreecommitdiffstats
path: root/toolchain/binutils/2.14.90.0.8/001-debian.patch
blob: 780823542a96325b303fb8ba58c4fb9054c6fcd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
diff -urN binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c binutils-2.14.90.0.8/bfd/elf64-alpha.c
--- binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c	2004-01-14 15:07:43.000000000 -0600
+++ binutils-2.14.90.0.8/bfd/elf64-alpha.c	2004-02-11 03:42:05.000000000 -0600
@@ -4144,9 +4144,12 @@
 
   loc = srel->contents;
   loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
-  bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
-  BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
-	      <= srel->_cooked_size);
+  if (loc)
+    {
+      bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
+      BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
+		  <= srel->_cooked_size);
+    }
 }
 
 /* Relocate an Alpha ELF section for a relocatable link.
diff -urN binutils-2.14.90.0.8-dist/bfd/opncls.c binutils-2.14.90.0.8/bfd/opncls.c
--- binutils-2.14.90.0.8-dist/bfd/opncls.c	2004-01-14 15:07:43.000000000 -0600
+++ binutils-2.14.90.0.8/bfd/opncls.c	2004-02-11 03:42:01.000000000 -0600
@@ -150,6 +150,13 @@
 {
   bfd *nbfd;
   const bfd_target *target_vec;
+  struct stat s;
+
+  if (stat (filename, &s) == 0)
+    if (S_ISDIR(s.st_mode)) {
+      bfd_set_error (bfd_error_file_not_recognized);
+      return NULL;
+    }
 
   nbfd = _bfd_new_bfd ();
   if (nbfd == NULL)
diff -urN binutils-2.14.90.0.8-dist/gprof/gprof.texi binutils-2.14.90.0.8/gprof/gprof.texi
--- binutils-2.14.90.0.8-dist/gprof/gprof.texi	2004-01-14 15:07:51.000000000 -0600
+++ binutils-2.14.90.0.8/gprof/gprof.texi	2004-02-11 03:42:01.000000000 -0600
@@ -138,6 +138,10 @@
 If more than one profile file is specified, the @code{gprof}
 output shows the sum of the profile information in the given profile files.
 
+If you use gcc 2.95.x or 3.0 to compile your binaries, you may need
+to add the @samp{-fprofile-arcs} to the compile command line in order
+for the call graphs to be properly stored in gmon.out.
+
 @code{Gprof} calculates the amount of time spent in each routine.
 Next, these times are propagated along the edges of the call graph.
 Cycles are discovered, and calls into a cycle are made to share the time
@@ -182,7 +186,7 @@
 @c man end
 
 @c man begin SEEALSO
-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
+profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
 
 ``An Execution Profiler for Modular Programs'',
 by S. Graham, P. Kessler, M. McKusick;
@@ -268,6 +272,11 @@
 options.  The same option, @samp{-pg}, alters either compilation or linking
 to do what is necessary for profiling.  Here are examples:
 
+If you use gcc 2.95.x or 3.0.x, you may need to add the
+@samp{-fprofile-arcs} option to the compile line along with @samp{-pg}
+in order to allow the call-graphs to be properly included in the gmon.out
+file.
+
 @example
 cc -g -c myprog.c utils.c -pg
 cc -o myprog myprog.o utils.o -pg
diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.am binutils-2.14.90.0.8/ld/Makefile.am
--- binutils-2.14.90.0.8-dist/ld/Makefile.am	2004-01-14 15:07:52.000000000 -0600
+++ binutils-2.14.90.0.8/ld/Makefile.am	2004-02-11 03:42:01.000000000 -0600
@@ -19,7 +19,7 @@
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
 # directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+scriptdir = $(libdir)
 
 EMUL = @EMUL@
 EMULATION_OFILES = @EMULATION_OFILES@
diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.in binutils-2.14.90.0.8/ld/Makefile.in
--- binutils-2.14.90.0.8-dist/ld/Makefile.in	2004-01-14 15:07:52.000000000 -0600
+++ binutils-2.14.90.0.8/ld/Makefile.in	2004-02-11 03:42:01.000000000 -0600
@@ -128,7 +128,7 @@
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
 # directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+scriptdir = $(libdir)
 
 EMUL = @EMUL@
 EMULATION_OFILES = @EMULATION_OFILES@
diff -urN binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em binutils-2.14.90.0.8/ld/emultempl/elf32.em
--- binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em	2004-01-14 15:07:53.000000000 -0600
+++ binutils-2.14.90.0.8/ld/emultempl/elf32.em	2004-02-11 03:42:01.000000000 -0600
@@ -671,6 +671,8 @@
 	      && command_line.rpath == NULL)
 	    {
 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
+	      if ((lib_path) && (strlen (lib_path) == 0))
+		  lib_path = NULL;
 	      if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
 						      force))
 		break;
@@ -850,6 +852,8 @@
   rpath = command_line.rpath;
   if (rpath == NULL)
     rpath = (const char *) getenv ("LD_RUN_PATH");
+  if ((rpath) && (strlen (rpath) == 0))
+      rpath = NULL;
   if (! (bfd_elf${ELFSIZE}_size_dynamic_sections
 	 (output_bfd, command_line.soname, rpath,
 	  command_line.filter_shlib,
diff -urN binutils-2.14.90.0.8-dist/ltmain.sh binutils-2.14.90.0.8/ltmain.sh
--- binutils-2.14.90.0.8-dist/ltmain.sh	2002-03-22 16:06:16.000000000 -0600
+++ binutils-2.14.90.0.8/ltmain.sh	2004-02-11 03:42:05.000000000 -0600
@@ -4413,6 +4413,10 @@
       # LD_LIBRARY_PATH before the program is installed.
       $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
       $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      if test -n "$linkname"; then
+        $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)"
+        $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $?
+      fi
       ;;
     esac
     exit 0
diff -urN binutils-2.14.90.0.8-dist/opcodes/i386-dis.c binutils-2.14.90.0.8/opcodes/i386-dis.c
--- binutils-2.14.90.0.8-dist/opcodes/i386-dis.c	2004-01-14 15:07:55.000000000 -0600
+++ binutils-2.14.90.0.8/opcodes/i386-dis.c	2004-02-11 03:42:01.000000000 -0600
@@ -1879,7 +1879,7 @@
  * The function returns the length of this instruction in bytes.
  */
 
-static char intel_syntax;
+static signed char intel_syntax;
 static char open_char;
 static char close_char;
 static char separator_char;