aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2008-05-30 21:24:43 +0000
committerCary Coutant <ccoutant@google.com>2008-05-30 21:24:43 +0000
commit3e90f13524d5fb583ed113a33be07bfc6f141b0c (patch)
tree58edf5693b4e936a6648f89df5175de2dde52884 /gold
parenta5dabbb023b2e178d8c1c3800dd268eb71471650 (diff)
downloadgdb-3e90f13524d5fb583ed113a33be07bfc6f141b0c.zip
gdb-3e90f13524d5fb583ed113a33be07bfc6f141b0c.tar.gz
gdb-3e90f13524d5fb583ed113a33be07bfc6f141b0c.tar.bz2
* archive.cc (Archive::include_all_members) Correct to step
over symbol table and extended name table in thin archives.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/archive.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 0fb667d..74eb045 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-30 Cary Coutant <ccoutant@google.com>
+
+ * archive.cc (Archive::include_all_members) Correct to step
+ over symbol table and extended name table in thin archives.
+
2008-05-29 Kris Van Hees <kris.van.hees@oracle.com>
PR 6407
diff --git a/gold/archive.cc b/gold/archive.cc
index 0ff8aee..737f3e2 100644
--- a/gold/archive.cc
+++ b/gold/archive.cc
@@ -386,20 +386,23 @@ Archive::include_all_members(Symbol_table* symtab, Layout* layout,
reinterpret_cast<const Archive_header*>(hdr_buf);
std::string name;
off_t size = this->interpret_header(hdr, off, &name, NULL);
+ bool special_member = false;
if (name.empty())
{
// Symbol table.
+ special_member = true;
}
else if (name == "/")
{
// Extended name table.
+ special_member = true;
}
else
this->include_member(symtab, layout, input_objects, off,
mapfile, NULL, "--whole-archive");
off += sizeof(Archive_header);
- if (!this->is_thin_archive_)
+ if (special_member || !this->is_thin_archive_)
off += size;
if ((off & 1) != 0)
++off;