mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-31 22:04:12 +08:00
* archive.cc (Archive::include_all_members) Correct to step
over symbol table and extended name table in thin archives.
This commit is contained in:
@ -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>
|
2008-05-29 Kris Van Hees <kris.van.hees@oracle.com>
|
||||||
|
|
||||||
PR 6407
|
PR 6407
|
||||||
|
@ -386,20 +386,23 @@ Archive::include_all_members(Symbol_table* symtab, Layout* layout,
|
|||||||
reinterpret_cast<const Archive_header*>(hdr_buf);
|
reinterpret_cast<const Archive_header*>(hdr_buf);
|
||||||
std::string name;
|
std::string name;
|
||||||
off_t size = this->interpret_header(hdr, off, &name, NULL);
|
off_t size = this->interpret_header(hdr, off, &name, NULL);
|
||||||
|
bool special_member = false;
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
{
|
{
|
||||||
// Symbol table.
|
// Symbol table.
|
||||||
|
special_member = true;
|
||||||
}
|
}
|
||||||
else if (name == "/")
|
else if (name == "/")
|
||||||
{
|
{
|
||||||
// Extended name table.
|
// Extended name table.
|
||||||
|
special_member = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this->include_member(symtab, layout, input_objects, off,
|
this->include_member(symtab, layout, input_objects, off,
|
||||||
mapfile, NULL, "--whole-archive");
|
mapfile, NULL, "--whole-archive");
|
||||||
|
|
||||||
off += sizeof(Archive_header);
|
off += sizeof(Archive_header);
|
||||||
if (!this->is_thin_archive_)
|
if (special_member || !this->is_thin_archive_)
|
||||||
off += size;
|
off += size;
|
||||||
if ((off & 1) != 0)
|
if ((off & 1) != 0)
|
||||||
++off;
|
++off;
|
||||||
|
Reference in New Issue
Block a user