aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-11 06:44:13 +0000
committerAlan Modra <amodra@gmail.com>2011-10-11 06:44:13 +0000
commitb228303dd14e6ef1fbee7ffa8db7054a999c02a6 (patch)
tree8cf0301f427a8823a653b19e6911891e2f7e692c /bfd/archive.c
parent98c53ba3060c6a4b0c7e5370cda665f2b450facb (diff)
downloadgdb-b228303dd14e6ef1fbee7ffa8db7054a999c02a6.zip
gdb-b228303dd14e6ef1fbee7ffa8db7054a999c02a6.tar.gz
gdb-b228303dd14e6ef1fbee7ffa8db7054a999c02a6.tar.bz2
PR binutils/13278
* archive.c (bfd_generic_archive_p): Only check first element when target_defaulted. (_bfd_construct_extended_name_table): Use ar_maxnamelen. (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 44ac712..3e333c7 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -793,7 +793,7 @@ bfd_generic_archive_p (bfd *abfd)
return NULL;
}
- if (bfd_has_map (abfd))
+ if (abfd->target_defaulted && bfd_has_map (abfd))
{
bfd *first;
@@ -1512,7 +1512,7 @@ _bfd_construct_extended_name_table (bfd *abfd,
char **tabloc,
bfd_size_type *tablen)
{
- unsigned int maxname = abfd->xvec->ar_max_namelen;
+ unsigned int maxname = ar_maxnamelen (abfd);
bfd_size_type total_namelen = 0;
bfd *current;
char *strptr;
@@ -1707,7 +1707,7 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
bfd_size_type *tablen,
const char **name)
{
- unsigned int maxname = abfd->xvec->ar_max_namelen;
+ unsigned int maxname = ar_maxnamelen (abfd);
bfd *current;
*tablen = 0;