aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-25 03:04:34 +0000
committerAlan Modra <amodra@gmail.com>2011-10-25 03:04:34 +0000
commitb65fcc7c84c921cc4357db3df19581a400ef969f (patch)
tree6619a7ba3dceb025d6aeba8f51f2637631e863f9
parent655289e4c4a047ed45b8ac4899e075d1250c7c21 (diff)
downloadgdb-b65fcc7c84c921cc4357db3df19581a400ef969f.zip
gdb-b65fcc7c84c921cc4357db3df19581a400ef969f.tar.gz
gdb-b65fcc7c84c921cc4357db3df19581a400ef969f.tar.bz2
PR binutils/13278
2011-10-11 Alan Modra <amodra@gmail.com> * 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.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/archive.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ea5d792..aabe22d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -2,6 +2,13 @@
Apply mainline patches
2011-10-11 Alan Modra <amodra@gmail.com>
+ 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.
+
+ 2011-10-11 Alan Modra <amodra@gmail.com>
PR binutils/13257
* archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
thin archive element using container target if not defaulted.
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;