| OLD | NEW |
| 1 /* MIPS-specific support for 64-bit ELF | 1 /* MIPS-specific support for 64-bit ELF |
| 2 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, | 2 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, |
| 3 2010 Free Software Foundation, Inc. | 3 2010, 2012 Free Software Foundation, Inc. |
| 4 Ian Lance Taylor, Cygnus Support | 4 Ian Lance Taylor, Cygnus Support |
| 5 Linker support added by Mark Mitchell, CodeSourcery, LLC. | 5 Linker support added by Mark Mitchell, CodeSourcery, LLC. |
| 6 <mark@codesourcery.com> | 6 <mark@codesourcery.com> |
| 7 | 7 |
| 8 This file is part of BFD, the Binary File Descriptor library. | 8 This file is part of BFD, the Binary File Descriptor library. |
| 9 | 9 |
| 10 This program is free software; you can redistribute it and/or modify | 10 This program is free software; you can redistribute it and/or modify |
| 11 it under the terms of the GNU General Public License as published by | 11 it under the terms of the GNU General Public License as published by |
| 12 the Free Software Foundation; either version 3 of the License, or | 12 the Free Software Foundation; either version 3 of the License, or |
| 13 (at your option) any later version. | 13 (at your option) any later version. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 mapsize += padding; | 162 mapsize += padding; |
| 163 | 163 |
| 164 /* work out where the first object file will go in the archive */ | 164 /* work out where the first object file will go in the archive */ |
| 165 archive_member_file_ptr = (mapsize | 165 archive_member_file_ptr = (mapsize |
| 166 + elength | 166 + elength |
| 167 + sizeof (struct ar_hdr) | 167 + sizeof (struct ar_hdr) |
| 168 + SARMAG); | 168 + SARMAG); |
| 169 | 169 |
| 170 memset (&hdr, ' ', sizeof (struct ar_hdr)); | 170 memset (&hdr, ' ', sizeof (struct ar_hdr)); |
| 171 memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); | 171 memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); |
| 172 _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", | 172 if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) |
| 173 mapsize); | 173 return FALSE; |
| 174 _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", | 174 _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", |
| 175 time (NULL)); | 175 time (NULL)); |
| 176 /* This, at least, is what Intel coff sets the values to.: */ | 176 /* This, at least, is what Intel coff sets the values to.: */ |
| 177 _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0); | 177 _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0); |
| 178 _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0); | 178 _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0); |
| 179 _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0); | 179 _bfd_ar_spacepad (hdr.ar_mode, sizeof (hdr.ar_mode), "%-7lo", 0); |
| 180 memcpy (hdr.ar_fmag, ARFMAG, 2); | 180 memcpy (hdr.ar_fmag, ARFMAG, 2); |
| 181 | 181 |
| 182 /* Write the ar header for this item and the number of symbols */ | 182 /* Write the ar header for this item and the number of symbols */ |
| 183 | 183 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 However, the Irix 6.2 tools do not appear to do this. */ | 230 However, the Irix 6.2 tools do not appear to do this. */ |
| 231 while (padding != 0) | 231 while (padding != 0) |
| 232 { | 232 { |
| 233 if (bfd_bwrite ("", 1, arch) != 1) | 233 if (bfd_bwrite ("", 1, arch) != 1) |
| 234 return FALSE; | 234 return FALSE; |
| 235 --padding; | 235 --padding; |
| 236 } | 236 } |
| 237 | 237 |
| 238 return TRUE; | 238 return TRUE; |
| 239 } | 239 } |
| OLD | NEW |