From 89a58aeb3e133aa6395a1cea49e9933c95708f46 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 31 Mar 2008 23:44:47 +0000 Subject: [PATCH] PR 6006 * archive.c (_bfd_slurp_extended_name_table): Change ARFMAG[0] to ARFMAG[1]. (_bfd_construct_extended_name_table): Likewise. --- bfd/ChangeLog | 9 ++++++++- bfd/archive.c | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 22df7376d7e..2b029bb9be5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2008-03-31 Cary Coutant + + 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 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment. @@ -6,7 +13,7 @@ 2008-03-27 Cary Coutant - 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 diff --git a/bfd/archive.c b/bfd/archive.c index 5389f7adcc5..9861ed9ad45 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -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; -- 2.30.2