// archive.h -- archive support for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
bool
add_symbols(Symbol_table*, Layout*, Input_objects*, Mapfile*);
+ // Return whether the archive defines the symbol.
+ bool
+ defines_symbol(Symbol*) const;
+
// Dump statistical information to stderr.
static void
print_stats();
// The directory search path.
Dirsearch* dirpath_;
// The task reading this archive.
- Task *task_;
+ Task* task_;
// Number of members in this archive;
unsigned int num_members_;
// True if we exclude this library archive from automatic export.
Task_token* next_blocker_;
};
-// This class represents the files surrunded by a --start-lib ... --end-lib.
+// This class represents the files surrounded by a --start-lib ... --end-lib.
class Lib_group
{
// For reading the files.
const Input_file_lib* lib_;
// The task reading this lib group.
- Task *task_;
+ Task* task_;
// Table of the objects in the group.
std::vector<Archive_member> members_;
};
Input_objects* input_objects,
Lib_group* lib, Task_token* next_blocker)
: symtab_(symtab), layout_(layout), input_objects_(input_objects),
- lib_(lib), this_blocker_(NULL), next_blocker_(next_blocker)
+ lib_(lib), readsyms_blocker_(NULL), this_blocker_(NULL),
+ next_blocker_(next_blocker)
{ }
~Add_lib_group_symbols();
// Set the blocker to use for this task.
void
- set_blocker(Task_token* this_blocker)
+ set_blocker(Task_token* readsyms_blocker, Task_token* this_blocker)
{
- gold_assert(this->this_blocker_ == NULL);
+ gold_assert(this->readsyms_blocker_ == NULL && this->this_blocker_ == NULL);
+ this->readsyms_blocker_ = readsyms_blocker;
this->this_blocker_ = this_blocker;
}
Symbol_table* symtab_;
Layout* layout_;
Input_objects* input_objects_;
- Lib_group * lib_;
+ Lib_group* lib_;
+ Task_token* readsyms_blocker_;
Task_token* this_blocker_;
Task_token* next_blocker_;
};