PR 6006
authorAlan Modra <amodra@gmail.com>
Mon, 31 Mar 2008 23:44:47 +0000 (23:44 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 31 Mar 2008 23:44:47 +0000 (23:44 +0000)
* archive.c (_bfd_slurp_extended_name_table): Change
ARFMAG[0] to ARFMAG[1].
(_bfd_construct_extended_name_table): Likewise.

bfd/ChangeLog
bfd/archive.c

index 22df7376d7ec46db8885f516fc87efd1ba2f7cd0..2b029bb9be5b288a2de3cd8eabb3ed5d91dc1a79 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-31  Cary Coutant  <ccoutant@google.com>
+
+       PR 6006
+       * archive.c (_bfd_slurp_extended_name_table): Change
+       ARFMAG[0] to ARFMAG[1].
+       (_bfd_construct_extended_name_table): Likewise.
+
 2008-03-31  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
@@ -6,7 +13,7 @@
 
 2008-03-27  Cary Coutant  <ccoutant@google.com>
 
-        Add support for thin archives.
+       Add support for thin archives.
        * archive.c (_bfd_find_nested_archive): New function.
        (get_extended_arelt_filename): Add origin parameter.
        (_bfd_generic_read_ar_hdr_mag): Deal with extended name
index 5389f7adcc5b983850c4f9a596f834871d528292..9861ed9ad4511ab66fc12d92501464102413c81a 100644 (file)
@@ -1233,7 +1233,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
        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 *abfd,
             {
              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;