Add cast to avoid signed/unsigned warning.
[deliverable/binutils-gdb.git] / gold / script.h
CommitLineData
dbe717ef
ILT
1// script.h -- handle linker scripts for gold -*- C++ -*-
2
6cb15b7f
ILT
3// Copyright 2006, 2007 Free Software Foundation, Inc.
4// Written by Ian Lance Taylor <iant@google.com>.
5
6// This file is part of gold.
7
8// This program is free software; you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation; either version 3 of the License, or
11// (at your option) any later version.
12
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21// MA 02110-1301, USA.
22
dbe717ef
ILT
23// We implement a subset of the original GNU ld linker script language
24// for compatibility. The goal is not to implement the entire
25// language. It is merely to implement enough to handle common uses.
26// In particular we need to handle /usr/lib/libc.so on a typical
27// GNU/Linux system, and we want to handle linker scripts used by the
28// Linux kernel build.
29
30#ifndef GOLD_SCRIPT_H
31#define GOLD_SCRIPT_H
32
33namespace gold
34{
35
36class General_options;
3c2fafa5 37class Command_line;
dbe717ef
ILT
38class Symbol_table;
39class Layout;
3c2fafa5 40class Input_argument;
dbe717ef
ILT
41class Input_objects;
42class Input_group;
43class Input_file;
44class Task_token;
3c2fafa5 45class Workqueue;
dbe717ef
ILT
46
47// FILE was found as an argument on the command line, but was not
48// recognized as an ELF file. Try to read it as a script. We've
49// already read BYTES of data into P. Return true if the file was
50// handled. This has to handle /usr/lib/libc.so on a GNU/Linux
51// system.
52
53bool
54read_input_script(Workqueue*, const General_options&, Symbol_table*, Layout*,
17a1d0a9 55 Dirsearch*, Input_objects*, Input_group*,
dbe717ef
ILT
56 const Input_argument*, Input_file*, const unsigned char* p,
57 off_t bytes, Task_token* this_blocker,
58 Task_token* next_blocker);
59
3c2fafa5
ILT
60// FILE was found as an argument to --script (-T).
61// Read it as a script, and execute its contents immediately.
62
63bool
64read_commandline_script(const char* filename, Command_line*);
65
dbe717ef
ILT
66} // End namespace gold.
67
68#endif // !defined(GOLD_SCRIPT_H)
This page took 0.062577 seconds and 4 git commands to generate.