source: rtems/contrib/crossrpms/patches/binutils-2.16.1-rtems-20050708.diff @ 92b61a71

4.104.114.84.9
Last change on this file since 92b61a71 was 72f8c0c6, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jul 5, 2006 at 2:22:52 PM

New.

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[72f8c0c6]1--- binutils-2.16.1/bfd/config.bfd      31 Jan 2005 17:18:47 -0000      1.181
2+++ binutils-2.16.1/bfd/config.bfd      5 Jul 2005 15:32:00 -0000
3@@ -369,7 +369,12 @@
4     targ_selvecs=bfd_elf32_frv_vec
5     ;;
6 
7-  h8300*-*-elf)
8+  h8300*-*-rtemscoff*)
9+    targ_defvec=h8300coff_vec
10+    targ_underscore=yes
11+    ;;
12+
13+  h8300*-*-elf | h8300*-*-rtems*)
14     targ_defvec=bfd_elf32_h8300_vec
15     targ_underscore=yes
16     ;;
17--- binutils-2.16.1/gas/configure.tgt   31 Jan 2005 17:18:51 -0000      1.3
18+++ binutils-2.16.1/gas/configure.tgt   5 Jul 2005 15:32:03 -0000
19@@ -163,9 +163,9 @@
20   hppa-*-bsd*)                         fmt=som em=hppa ;;
21   hppa-*-hiux*)                                fmt=som em=hppa ;;
22 
23-  h8300-*-rtems*)                      fmt=coff ;;
24+  h8300-*-rtemscoff*)                  fmt=coff ;;
25   h8300-*-coff)                                fmt=coff ;;
26-  h8300-*-elf)                         fmt=elf ;;
27+  h8300-*-elf | h8300-*-rtems*)                fmt=elf ;;
28   h8500-*-rtems*)                      fmt=coff ;;
29   h8500-*-coff)                                fmt=coff ;;
30 
31--- binutils-2.16.1/ld/configure.tgt    8 Feb 2005 19:54:27 -0000       1.165
32+++ binutils-2.16.1/ld/configure.tgt    5 Jul 2005 15:32:18 -0000
33@@ -280,10 +280,10 @@
34                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
35 xscale-*-coff)         targ_emul=armcoff ;;
36 xscale-*-elf)          targ_emul=armelf ;;
37-h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*)
38+h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
39                        targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn"
40                        ;;
41-h8300-*-elf*)
42+h8300-*-elf* | h8300-*-rtems*)
43                        targ_emul=h8300elf;
44                        targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
45                        ;;
46--- binutils-2.16.1/bfd/archive.c       3 Mar 2005 11:40:56 -0000       1.34
47+++ binutils-2.16.1/bfd/archive.c       8 Jul 2005 06:28:30 -0000
48@@ -1308,6 +1308,13 @@
49 #define getgid() 0
50 #endif
51 
52+static void print_ar_size( struct ar_hdr* hdr, int val )
53+{
54+  char buffer[sizeof(hdr->ar_size)+1];
55+  sprintf(buffer,"%-10d", val);
56+  memcpy(hdr->ar_size,buffer,sizeof(hdr->ar_size));
57+}
58+
59 /* Takes a filename, returns an arelt_data for it, or NULL if it can't
60    make one.  The filename must refer to a filename in the filesystem.
61    The filename field of the ar_hdr will NOT be initialized.  If member
62@@ -1368,7 +1375,7 @@
63 #endif
64   sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
65   sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
66-  sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
67+  print_ar_size(hdr, (long) status.st_size);
68   /* Correct for a lossage in sprintf whereby it null-terminates.  I cannot
69      understand how these C losers could design such a ramshackle bunch of
70      IO operations.  */
71@@ -1660,7 +1667,7 @@
72       memset (&hdr, 0, sizeof (struct ar_hdr));
73       strcpy (hdr.ar_name, ename);
74       /* Round size up to even number in archive header.  */
75-      sprintf (&(hdr.ar_size[0]), "%-10d",
76+      print_ar_size(&hdr,
77               (int) ((elength + 1) & ~(bfd_size_type) 1));
78       strncpy (hdr.ar_fmag, ARFMAG, 2);
79       for (i = 0; i < sizeof (struct ar_hdr); i++)
80@@ -1913,7 +1920,7 @@
81   sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
82   sprintf (hdr.ar_uid, "%ld", (long) getuid ());
83   sprintf (hdr.ar_gid, "%ld", (long) getgid ());
84-  sprintf (hdr.ar_size, "%-10d", (int) mapsize);
85+  print_ar_size(&hdr, (int) mapsize);
86   strncpy (hdr.ar_fmag, ARFMAG, 2);
87   for (i = 0; i < sizeof (struct ar_hdr); i++)
88     if (((char *) (&hdr))[i] == '\0')
89@@ -2068,7 +2075,7 @@
90 
91   memset (&hdr, 0, sizeof (struct ar_hdr));
92   hdr.ar_name[0] = '/';
93-  sprintf (hdr.ar_size, "%-10d", (int) mapsize);
94+  print_ar_size (&hdr, (int) mapsize);
95   sprintf (hdr.ar_date, "%ld", (long) time (NULL));
96   /* This, at least, is what Intel coff sets the values to.  */
97   sprintf ((hdr.ar_uid), "%d", 0);
Note: See TracBrowser for help on using the repository browser.