2006-11-03 19:26:11 +01:00
|
|
|
// common.h -- handle common symbols for gold -*- C++ -*-
|
|
|
|
|
2010-02-12 05:33:53 +01:00
|
|
|
// Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
|
2007-09-22 23:02:10 +02:00
|
|
|
// Written by Ian Lance Taylor <iant@google.com>.
|
|
|
|
|
|
|
|
// This file is part of gold.
|
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation; either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
// MA 02110-1301, USA.
|
|
|
|
|
2006-11-03 19:26:11 +01:00
|
|
|
#ifndef GOLD_COMMON_H
|
|
|
|
#define GOLD_COMMON_H
|
|
|
|
|
|
|
|
#include "workqueue.h"
|
|
|
|
|
|
|
|
namespace gold
|
|
|
|
{
|
|
|
|
|
|
|
|
class Symbol_table;
|
|
|
|
|
|
|
|
// This task is used to allocate the common symbols.
|
|
|
|
|
|
|
|
class Allocate_commons_task : public Task
|
|
|
|
{
|
|
|
|
public:
|
2008-05-21 23:37:44 +02:00
|
|
|
Allocate_commons_task(Symbol_table* symtab, Layout* layout, Mapfile* mapfile,
|
2010-02-12 05:33:53 +01:00
|
|
|
Task_token* blocker)
|
|
|
|
: symtab_(symtab), layout_(layout), mapfile_(mapfile), blocker_(blocker)
|
2006-11-03 19:26:11 +01:00
|
|
|
{ }
|
|
|
|
|
|
|
|
// The standard Task methods.
|
|
|
|
|
2007-12-14 20:00:21 +01:00
|
|
|
Task_token*
|
|
|
|
is_runnable();
|
2006-11-03 19:26:11 +01:00
|
|
|
|
2007-12-14 20:00:21 +01:00
|
|
|
void
|
|
|
|
locks(Task_locker*);
|
2006-11-03 19:26:11 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
run(Workqueue*);
|
|
|
|
|
2007-11-22 01:05:51 +01:00
|
|
|
std::string
|
|
|
|
get_name() const
|
|
|
|
{ return "Allocate_commons_task"; }
|
|
|
|
|
2006-11-03 19:26:11 +01:00
|
|
|
private:
|
|
|
|
Symbol_table* symtab_;
|
|
|
|
Layout* layout_;
|
2008-05-21 23:37:44 +02:00
|
|
|
Mapfile* mapfile_;
|
2006-11-03 19:26:11 +01:00
|
|
|
Task_token* blocker_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End namespace gold.
|
|
|
|
|
|
|
|
#endif // !defined(GOLD_COMMON_H)
|