1*a9fa9459Szrj // common.h -- handle common symbols for gold -*- C++ -*- 2*a9fa9459Szrj 3*a9fa9459Szrj // Copyright (C) 2006-2016 Free Software Foundation, Inc. 4*a9fa9459Szrj // Written by Ian Lance Taylor <iant@google.com>. 5*a9fa9459Szrj 6*a9fa9459Szrj // This file is part of gold. 7*a9fa9459Szrj 8*a9fa9459Szrj // This program is free software; you can redistribute it and/or modify 9*a9fa9459Szrj // it under the terms of the GNU General Public License as published by 10*a9fa9459Szrj // the Free Software Foundation; either version 3 of the License, or 11*a9fa9459Szrj // (at your option) any later version. 12*a9fa9459Szrj 13*a9fa9459Szrj // This program is distributed in the hope that it will be useful, 14*a9fa9459Szrj // but WITHOUT ANY WARRANTY; without even the implied warranty of 15*a9fa9459Szrj // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*a9fa9459Szrj // GNU General Public License for more details. 17*a9fa9459Szrj 18*a9fa9459Szrj // You should have received a copy of the GNU General Public License 19*a9fa9459Szrj // along with this program; if not, write to the Free Software 20*a9fa9459Szrj // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 21*a9fa9459Szrj // MA 02110-1301, USA. 22*a9fa9459Szrj 23*a9fa9459Szrj #ifndef GOLD_COMMON_H 24*a9fa9459Szrj #define GOLD_COMMON_H 25*a9fa9459Szrj 26*a9fa9459Szrj #include "workqueue.h" 27*a9fa9459Szrj 28*a9fa9459Szrj namespace gold 29*a9fa9459Szrj { 30*a9fa9459Szrj 31*a9fa9459Szrj class Symbol_table; 32*a9fa9459Szrj 33*a9fa9459Szrj // This task is used to allocate the common symbols. 34*a9fa9459Szrj 35*a9fa9459Szrj class Allocate_commons_task : public Task 36*a9fa9459Szrj { 37*a9fa9459Szrj public: Allocate_commons_task(Symbol_table * symtab,Layout * layout,Mapfile * mapfile,Task_token * blocker)38*a9fa9459Szrj Allocate_commons_task(Symbol_table* symtab, Layout* layout, Mapfile* mapfile, 39*a9fa9459Szrj Task_token* blocker) 40*a9fa9459Szrj : symtab_(symtab), layout_(layout), mapfile_(mapfile), blocker_(blocker) 41*a9fa9459Szrj { } 42*a9fa9459Szrj 43*a9fa9459Szrj // The standard Task methods. 44*a9fa9459Szrj 45*a9fa9459Szrj Task_token* 46*a9fa9459Szrj is_runnable(); 47*a9fa9459Szrj 48*a9fa9459Szrj void 49*a9fa9459Szrj locks(Task_locker*); 50*a9fa9459Szrj 51*a9fa9459Szrj void 52*a9fa9459Szrj run(Workqueue*); 53*a9fa9459Szrj 54*a9fa9459Szrj std::string get_name()55*a9fa9459Szrj get_name() const 56*a9fa9459Szrj { return "Allocate_commons_task"; } 57*a9fa9459Szrj 58*a9fa9459Szrj private: 59*a9fa9459Szrj Symbol_table* symtab_; 60*a9fa9459Szrj Layout* layout_; 61*a9fa9459Szrj Mapfile* mapfile_; 62*a9fa9459Szrj Task_token* blocker_; 63*a9fa9459Szrj }; 64*a9fa9459Szrj 65*a9fa9459Szrj } // End namespace gold. 66*a9fa9459Szrj 67*a9fa9459Szrj #endif // !defined(GOLD_COMMON_H) 68