This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Add support for "thin" archives
When Nick reviewed my patch, he did some additional code cleanup and
changed several instances of '\012' to ARFMAG[0]. That should have
been ARFMAG[1].
Here's a fix...
-cary
2008-03-31 Cary Coutant <ccoutant@google.com>
* archive.c (_bfd_slurp_extended_name_table): Chnage
ARFMAG[0] to ARFMAG[1].
(_bfd_construct_extended_name_table): Likewise.
Index: archive.c
===================================================================
RCS file: /cvs/src/src/bfd/archive.c,v
retrieving revision 1.52
diff -u -p -r1.52 archive.c
--- archive.c 28 Mar 2008 06:49:44 -0000 1.52
+++ archive.c 31 Mar 2008 20:37:40 -0000
@@ -1233,7 +1233,7 @@ _bfd_slurp_extended_name_table (bfd *abf
char *limit = temp + namedata->parsed_size;
for (; temp < limit; ++temp)
{
- if (*temp == ARFMAG[0])
+ if (*temp == ARFMAG[1])
temp[temp > ext_names && temp[-1] == '/' ? -1 : 0] = '\0';
if (*temp == '\\')
*temp = '/';
@@ -1564,11 +1564,11 @@ _bfd_construct_extended_name_table (bfd
{
strcpy (strptr, normal);
if (! trailing_slash)
- strptr[thislen] = ARFMAG[0];
+ strptr[thislen] = ARFMAG[1];
else
{
strptr[thislen] = '/';
- strptr[thislen + 1] = ARFMAG[0];
+ strptr[thislen + 1] = ARFMAG[1];
}
stroff = strptr - *tabloc;
last_stroff = stroff;