*** empty log message ***
[deliverable/binutils-gdb.git] / gold / object.h
CommitLineData
bae7f79e
ILT
1// object.h -- support for an object file for linking in 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
bae7f79e
ILT
23#ifndef GOLD_OBJECT_H
24#define GOLD_OBJECT_H
25
92e059d8 26#include <string>
a2fb1b05 27#include <vector>
14bfc3f5 28
bae7f79e 29#include "elfcpp.h"
645f8123 30#include "elfcpp_file.h"
bae7f79e 31#include "fileread.h"
14bfc3f5 32#include "target.h"
bae7f79e
ILT
33
34namespace gold
35{
36
92e059d8 37class General_options;
17a1d0a9 38class Task;
a2fb1b05 39class Layout;
61ba1cf9
ILT
40class Output_section;
41class Output_file;
f6ce93d6 42class Dynobj;
4625f782 43class Object_merge_map;
a2fb1b05 44
b8e6aad9
ILT
45template<typename Stringpool_char>
46class Stringpool_template;
47
bae7f79e
ILT
48// Data to pass from read_symbols() to add_symbols().
49
50struct Read_symbols_data
51{
12e14209
ILT
52 // Section headers.
53 File_view* section_headers;
54 // Section names.
55 File_view* section_names;
56 // Size of section name data in bytes.
57 off_t section_names_size;
bae7f79e
ILT
58 // Symbol data.
59 File_view* symbols;
60 // Size of symbol data in bytes.
61 off_t symbols_size;
730cdc88
ILT
62 // Offset of external symbols within symbol data. This structure
63 // sometimes contains only external symbols, in which case this will
64 // be zero. Sometimes it contains all symbols.
65 off_t external_symbols_offset;
bae7f79e
ILT
66 // Symbol names.
67 File_view* symbol_names;
68 // Size of symbol name data in bytes.
69 off_t symbol_names_size;
dbe717ef
ILT
70
71 // Version information. This is only used on dynamic objects.
72 // Version symbol data (from SHT_GNU_versym section).
73 File_view* versym;
74 off_t versym_size;
75 // Version definition data (from SHT_GNU_verdef section).
76 File_view* verdef;
77 off_t verdef_size;
78 unsigned int verdef_info;
79 // Needed version data (from SHT_GNU_verneed section).
80 File_view* verneed;
81 off_t verneed_size;
82 unsigned int verneed_info;
bae7f79e
ILT
83};
84
f7e2ee48
ILT
85// Information used to print error messages.
86
87struct Symbol_location_info
88{
89 std::string source_file;
90 std::string enclosing_symbol_name;
91 int line_number;
92};
93
92e059d8
ILT
94// Data about a single relocation section. This is read in
95// read_relocs and processed in scan_relocs.
96
97struct Section_relocs
98{
99 // Index of reloc section.
100 unsigned int reloc_shndx;
101 // Index of section that relocs apply to.
102 unsigned int data_shndx;
103 // Contents of reloc section.
104 File_view* contents;
105 // Reloc section type.
106 unsigned int sh_type;
107 // Number of reloc entries.
108 size_t reloc_count;
730cdc88
ILT
109 // Output section.
110 Output_section* output_section;
111 // Whether this section has special handling for offsets.
112 bool needs_special_offset_handling;
92e059d8
ILT
113};
114
115// Relocations in an object file. This is read in read_relocs and
116// processed in scan_relocs.
117
118struct Read_relocs_data
119{
120 typedef std::vector<Section_relocs> Relocs_list;
121 // The relocations.
122 Relocs_list relocs;
123 // The local symbols.
124 File_view* local_symbols;
125};
126
f6ce93d6
ILT
127// Object is an abstract base class which represents either a 32-bit
128// or a 64-bit input object. This can be a regular object file
129// (ET_REL) or a shared object (ET_DYN).
bae7f79e
ILT
130
131class Object
132{
133 public:
134 // NAME is the name of the object as we would report it to the user
135 // (e.g., libfoo.a(bar.o) if this is in an archive. INPUT_FILE is
136 // used to read the file. OFFSET is the offset within the input
137 // file--0 for a .o or .so file, something else for a .a file.
14bfc3f5
ILT
138 Object(const std::string& name, Input_file* input_file, bool is_dynamic,
139 off_t offset = 0)
dbe717ef 140 : name_(name), input_file_(input_file), offset_(offset), shnum_(-1U),
f6ce93d6 141 is_dynamic_(is_dynamic), target_(NULL)
bae7f79e
ILT
142 { }
143
144 virtual ~Object()
145 { }
146
14bfc3f5 147 // Return the name of the object as we would report it to the tuser.
bae7f79e
ILT
148 const std::string&
149 name() const
150 { return this->name_; }
151
cec9d2f3
ILT
152 // Get the offset into the file.
153 off_t
154 offset() const
155 { return this->offset_; }
156
14bfc3f5
ILT
157 // Return whether this is a dynamic object.
158 bool
159 is_dynamic() const
160 { return this->is_dynamic_; }
161
14bfc3f5
ILT
162 // Return the target structure associated with this object.
163 Target*
a2fb1b05 164 target() const
14bfc3f5
ILT
165 { return this->target_; }
166
a2fb1b05
ILT
167 // Lock the underlying file.
168 void
17a1d0a9
ILT
169 lock(const Task* t)
170 { this->input_file()->file().lock(t); }
a2fb1b05
ILT
171
172 // Unlock the underlying file.
173 void
17a1d0a9
ILT
174 unlock(const Task* t)
175 { this->input_file()->file().unlock(t); }
a2fb1b05
ILT
176
177 // Return whether the underlying file is locked.
178 bool
179 is_locked() const
7004837e 180 { return this->input_file()->file().is_locked(); }
a2fb1b05 181
17a1d0a9
ILT
182 // Return the token, so that the task can be queued.
183 Task_token*
184 token()
185 { return this->input_file()->file().token(); }
186
187 // Release the underlying file.
188 void
189 release()
190 { this->input_file_->file().release(); }
191
14bfc3f5
ILT
192 // Return the sized target structure associated with this object.
193 // This is like the target method but it returns a pointer of
194 // appropriate checked type.
195 template<int size, bool big_endian>
196 Sized_target<size, big_endian>*
7004837e 197 sized_target(ACCEPT_SIZE_ENDIAN_ONLY) const;
bae7f79e 198
5a6f7e2d
ILT
199 // Get the number of sections.
200 unsigned int
201 shnum() const
202 { return this->shnum_; }
a2fb1b05 203
f6ce93d6 204 // Return a view of the contents of a section. Set *PLEN to the
9eb9fa57 205 // size. CACHE is a hint as in File_read::get_view.
f6ce93d6 206 const unsigned char*
9eb9fa57 207 section_contents(unsigned int shndx, off_t* plen, bool cache);
f6ce93d6
ILT
208
209 // Return the name of a section given a section index. This is only
210 // used for error messages.
211 std::string
a3ad94ed
ILT
212 section_name(unsigned int shndx)
213 { return this->do_section_name(shndx); }
214
215 // Return the section flags given a section index.
216 uint64_t
217 section_flags(unsigned int shndx)
218 { return this->do_section_flags(shndx); }
f6ce93d6 219
730cdc88
ILT
220 // Return the section type given a section index.
221 unsigned int
222 section_type(unsigned int shndx)
223 { return this->do_section_type(shndx); }
224
f7e2ee48
ILT
225 // Return the section link field given a section index.
226 unsigned int
227 section_link(unsigned int shndx)
228 { return this->do_section_link(shndx); }
229
4c50553d
ILT
230 // Return the section info field given a section index.
231 unsigned int
232 section_info(unsigned int shndx)
233 { return this->do_section_info(shndx); }
234
5a6f7e2d
ILT
235 // Read the symbol information.
236 void
237 read_symbols(Read_symbols_data* sd)
238 { return this->do_read_symbols(sd); }
239
240 // Pass sections which should be included in the link to the Layout
241 // object, and record where the sections go in the output file.
242 void
7e1edb90
ILT
243 layout(Symbol_table* symtab, Layout* layout, Read_symbols_data* sd)
244 { this->do_layout(symtab, layout, sd); }
5a6f7e2d
ILT
245
246 // Add symbol information to the global symbol table.
247 void
248 add_symbols(Symbol_table* symtab, Read_symbols_data* sd)
249 { this->do_add_symbols(symtab, sd); }
250
645f8123
ILT
251 // Functions and types for the elfcpp::Elf_file interface. This
252 // permit us to use Object as the File template parameter for
253 // elfcpp::Elf_file.
254
255 // The View class is returned by view. It must support a single
256 // method, data(). This is trivial, because get_view does what we
257 // need.
258 class View
259 {
260 public:
261 View(const unsigned char* p)
262 : p_(p)
263 { }
264
265 const unsigned char*
266 data() const
267 { return this->p_; }
268
269 private:
270 const unsigned char* p_;
271 };
272
273 // Return a View.
274 View
275 view(off_t file_offset, off_t data_size)
9eb9fa57 276 { return View(this->get_view(file_offset, data_size, true)); }
645f8123
ILT
277
278 // Report an error.
279 void
75f2446e 280 error(const char* format, ...) const ATTRIBUTE_PRINTF_2;
645f8123
ILT
281
282 // A location in the file.
283 struct Location
284 {
285 off_t file_offset;
286 off_t data_size;
287
288 Location(off_t fo, off_t ds)
289 : file_offset(fo), data_size(ds)
290 { }
291 };
292
293 // Get a View given a Location.
294 View view(Location loc)
9eb9fa57 295 { return View(this->get_view(loc.file_offset, loc.data_size, true)); }
645f8123 296
f6ce93d6
ILT
297 protected:
298 // Read the symbols--implemented by child class.
299 virtual void
300 do_read_symbols(Read_symbols_data*) = 0;
301
302 // Lay out sections--implemented by child class.
303 virtual void
7e1edb90 304 do_layout(Symbol_table*, Layout*, Read_symbols_data*) = 0;
f6ce93d6
ILT
305
306 // Add symbol information to the global symbol table--implemented by
307 // child class.
308 virtual void
309 do_add_symbols(Symbol_table*, Read_symbols_data*) = 0;
310
645f8123
ILT
311 // Return the location of the contents of a section. Implemented by
312 // child class.
313 virtual Location
a3ad94ed 314 do_section_contents(unsigned int shndx) = 0;
f6ce93d6
ILT
315
316 // Get the name of a section--implemented by child class.
317 virtual std::string
a3ad94ed
ILT
318 do_section_name(unsigned int shndx) = 0;
319
320 // Get section flags--implemented by child class.
321 virtual uint64_t
322 do_section_flags(unsigned int shndx) = 0;
f6ce93d6 323
730cdc88
ILT
324 // Get section type--implemented by child class.
325 virtual unsigned int
326 do_section_type(unsigned int shndx) = 0;
327
f7e2ee48
ILT
328 // Get section link field--implemented by child class.
329 virtual unsigned int
330 do_section_link(unsigned int shndx) = 0;
331
4c50553d
ILT
332 // Get section info field--implemented by child class.
333 virtual unsigned int
334 do_section_info(unsigned int shndx) = 0;
335
17a1d0a9 336 // Get the file. We pass on const-ness.
f6ce93d6 337 Input_file*
7004837e
ILT
338 input_file()
339 { return this->input_file_; }
340
341 const Input_file*
f6ce93d6
ILT
342 input_file() const
343 { return this->input_file_; }
344
f6ce93d6
ILT
345 // Get a view into the underlying file.
346 const unsigned char*
9eb9fa57
ILT
347 get_view(off_t start, off_t size, bool cache)
348 {
7004837e
ILT
349 return this->input_file()->file().get_view(start + this->offset_, size,
350 cache);
9eb9fa57 351 }
f6ce93d6
ILT
352
353 // Get a lasting view into the underlying file.
354 File_view*
9eb9fa57 355 get_lasting_view(off_t start, off_t size, bool cache)
f6ce93d6 356 {
7004837e
ILT
357 return this->input_file()->file().get_lasting_view(start + this->offset_,
358 size, cache);
f6ce93d6
ILT
359 }
360
361 // Read data from the underlying file.
362 void
7004837e
ILT
363 read(off_t start, off_t size, void* p) const
364 { this->input_file()->file().read(start + this->offset_, size, p); }
f6ce93d6
ILT
365
366 // Set the target.
367 void
dbe717ef
ILT
368 set_target(int machine, int size, bool big_endian, int osabi,
369 int abiversion);
370
dbe717ef
ILT
371 // Set the number of sections.
372 void
373 set_shnum(int shnum)
374 { this->shnum_ = shnum; }
375
376 // Functions used by both Sized_relobj and Sized_dynobj.
377
378 // Read the section data into a Read_symbols_data object.
379 template<int size, bool big_endian>
380 void
381 read_section_data(elfcpp::Elf_file<size, big_endian, Object>*,
382 Read_symbols_data*);
383
384 // If NAME is the name of a special .gnu.warning section, arrange
385 // for the warning to be issued. SHNDX is the section index.
386 // Return whether it is a warning section.
387 bool
388 handle_gnu_warning_section(const char* name, unsigned int shndx,
389 Symbol_table*);
f6ce93d6
ILT
390
391 private:
392 // This class may not be copied.
393 Object(const Object&);
394 Object& operator=(const Object&);
395
396 // Name of object as printed to user.
397 std::string name_;
398 // For reading the file.
399 Input_file* input_file_;
400 // Offset within the file--0 for an object file, non-0 for an
401 // archive.
402 off_t offset_;
dbe717ef
ILT
403 // Number of input sections.
404 unsigned int shnum_;
f6ce93d6
ILT
405 // Whether this is a dynamic object.
406 bool is_dynamic_;
407 // Target functions--may be NULL if the target is not known.
408 Target* target_;
409};
410
411// Implement sized_target inline for efficiency. This approach breaks
412// static type checking, but is made safe using asserts.
413
414template<int size, bool big_endian>
415inline Sized_target<size, big_endian>*
7004837e 416Object::sized_target(ACCEPT_SIZE_ENDIAN_ONLY) const
f6ce93d6 417{
a3ad94ed
ILT
418 gold_assert(this->target_->get_size() == size);
419 gold_assert(this->target_->is_big_endian() ? big_endian : !big_endian);
f6ce93d6
ILT
420 return static_cast<Sized_target<size, big_endian>*>(this->target_);
421}
422
423// A regular object (ET_REL). This is an abstract base class itself.
b8e6aad9 424// The implementation is the template class Sized_relobj.
f6ce93d6
ILT
425
426class Relobj : public Object
427{
428 public:
429 Relobj(const std::string& name, Input_file* input_file, off_t offset = 0)
4625f782
ILT
430 : Object(name, input_file, false, offset),
431 map_to_output_(),
432 object_merge_map_(NULL),
433 relocs_must_follow_section_writes_(false)
f6ce93d6
ILT
434 { }
435
92e059d8 436 // Read the relocs.
a2fb1b05 437 void
92e059d8
ILT
438 read_relocs(Read_relocs_data* rd)
439 { return this->do_read_relocs(rd); }
440
441 // Scan the relocs and adjust the symbol table.
442 void
443 scan_relocs(const General_options& options, Symbol_table* symtab,
ead1e424
ILT
444 Layout* layout, Read_relocs_data* rd)
445 { return this->do_scan_relocs(options, symtab, layout, rd); }
a2fb1b05 446
6d013333
ILT
447 // The number of local symbols in the input symbol table.
448 virtual unsigned int
449 local_symbol_count() const
450 { return this->do_local_symbol_count(); }
451
7bf1f802
ILT
452 // Initial local symbol processing: count the number of local symbols
453 // in the output symbol table and dynamic symbol table; add local symbol
454 // names to *POOL and *DYNPOOL.
455 void
456 count_local_symbols(Stringpool_template<char>* pool,
457 Stringpool_template<char>* dynpool)
458 { return this->do_count_local_symbols(pool, dynpool); }
459
460 // Set the values of the local symbols, set the output symbol table
461 // indexes for the local variables, and set the offset where local
462 // symbol information will be stored. Returns the new local symbol index.
463 unsigned int
464 finalize_local_symbols(unsigned int index, off_t off)
465 { return this->do_finalize_local_symbols(index, off); }
466
467 // Set the output dynamic symbol table indexes for the local variables.
c06b7b0b 468 unsigned int
7bf1f802
ILT
469 set_local_dynsym_indexes(unsigned int index)
470 { return this->do_set_local_dynsym_indexes(index); }
471
472 // Set the offset where local dynamic symbol information will be stored.
473 unsigned int
474 set_local_dynsym_offset(off_t off)
475 { return this->do_set_local_dynsym_offset(off); }
75f65a3e 476
61ba1cf9
ILT
477 // Relocate the input sections and write out the local symbols.
478 void
479 relocate(const General_options& options, const Symbol_table* symtab,
92e059d8
ILT
480 const Layout* layout, Output_file* of)
481 { return this->do_relocate(options, symtab, layout, of); }
61ba1cf9 482
a783673b
ILT
483 // Return whether an input section is being included in the link.
484 bool
5a6f7e2d 485 is_section_included(unsigned int shndx) const
a783673b 486 {
5a6f7e2d
ILT
487 gold_assert(shndx < this->map_to_output_.size());
488 return this->map_to_output_[shndx].output_section != NULL;
a783673b
ILT
489 }
490
730cdc88
ILT
491 // Return whether an input section requires special
492 // handling--whether it is not simply mapped from the input file to
493 // the output file.
494 bool
495 is_section_specially_mapped(unsigned int shndx) const
496 {
497 gold_assert(shndx < this->map_to_output_.size());
498 return (this->map_to_output_[shndx].output_section != NULL
499 && this->map_to_output_[shndx].offset == -1);
500 }
501
a783673b
ILT
502 // Given a section index, return the corresponding Output_section
503 // (which will be NULL if the section is not included in the link)
730cdc88
ILT
504 // and set *POFF to the offset within that section. *POFF will be
505 // set to -1 if the section requires special handling.
a783673b 506 inline Output_section*
b8e6aad9 507 output_section(unsigned int shndx, off_t* poff) const;
a783673b 508
ead1e424
ILT
509 // Set the offset of an input section within its output section.
510 void
511 set_section_offset(unsigned int shndx, off_t off)
512 {
a3ad94ed 513 gold_assert(shndx < this->map_to_output_.size());
ead1e424
ILT
514 this->map_to_output_[shndx].offset = off;
515 }
516
730cdc88
ILT
517 // Return true if we need to wait for output sections to be written
518 // before we can apply relocations. This is true if the object has
519 // any relocations for sections which require special handling, such
520 // as the exception frame section.
521 bool
17a1d0a9 522 relocs_must_follow_section_writes() const
730cdc88
ILT
523 { return this->relocs_must_follow_section_writes_; }
524
4625f782
ILT
525 // Return the object merge map.
526 Object_merge_map*
527 merge_map() const
528 { return this->object_merge_map_; }
529
530 // Set the object merge map.
531 void
532 set_merge_map(Object_merge_map* object_merge_map)
533 {
534 gold_assert(this->object_merge_map_ == NULL);
535 this->object_merge_map_ = object_merge_map;
536 }
537
a783673b 538 protected:
a2fb1b05
ILT
539 // What we need to know to map an input section to an output
540 // section. We keep an array of these, one for each input section,
541 // indexed by the input section number.
542 struct Map_to_output
543 {
544 // The output section. This is NULL if the input section is to be
545 // discarded.
546 Output_section* output_section;
b8e6aad9
ILT
547 // The offset within the output section. This is -1 if the
548 // section requires special handling.
a2fb1b05
ILT
549 off_t offset;
550 };
551
92e059d8
ILT
552 // Read the relocs--implemented by child class.
553 virtual void
554 do_read_relocs(Read_relocs_data*) = 0;
555
556 // Scan the relocs--implemented by child class.
557 virtual void
ead1e424
ILT
558 do_scan_relocs(const General_options&, Symbol_table*, Layout*,
559 Read_relocs_data*) = 0;
92e059d8 560
6d013333
ILT
561 // Return the number of local symbols--implemented by child class.
562 virtual unsigned int
563 do_local_symbol_count() const = 0;
564
7bf1f802
ILT
565 // Count local symbols--implemented by child class.
566 virtual void
567 do_count_local_symbols(Stringpool_template<char>*,
b8e6aad9 568 Stringpool_template<char>*) = 0;
75f65a3e 569
7bf1f802
ILT
570 // Finalize the local symbols. Set the output symbol table indexes for the local variables, and set the
571 // offset where local symbol information will be stored.
572 virtual unsigned int
573 do_finalize_local_symbols(unsigned int, off_t) = 0;
574
575 // Set the output dynamic symbol table indexes for the local variables.
576 virtual unsigned int
577 do_set_local_dynsym_indexes(unsigned int) = 0;
578
579 // Set the offset where local dynamic symbol information will be stored.
580 virtual unsigned int
581 do_set_local_dynsym_offset(off_t) = 0;
582
61ba1cf9
ILT
583 // Relocate the input sections and write out the local
584 // symbols--implemented by child class.
585 virtual void
586 do_relocate(const General_options& options, const Symbol_table* symtab,
92e059d8
ILT
587 const Layout*, Output_file* of) = 0;
588
a2fb1b05
ILT
589 // Return the vector mapping input sections to output sections.
590 std::vector<Map_to_output>&
591 map_to_output()
592 { return this->map_to_output_; }
593
b8e6aad9
ILT
594 const std::vector<Map_to_output>&
595 map_to_output() const
596 { return this->map_to_output_; }
597
730cdc88
ILT
598 // Record that we must wait for the output sections to be written
599 // before applying relocations.
600 void
601 set_relocs_must_follow_section_writes()
602 { this->relocs_must_follow_section_writes_ = true; }
603
bae7f79e 604 private:
a2fb1b05
ILT
605 // Mapping from input sections to output section.
606 std::vector<Map_to_output> map_to_output_;
4625f782
ILT
607 // Mappings for merge sections. This is managed by the code in the
608 // Merge_map class.
609 Object_merge_map* object_merge_map_;
730cdc88
ILT
610 // Whether we need to wait for output sections to be written before
611 // we can apply relocations.
612 bool relocs_must_follow_section_writes_;
bae7f79e
ILT
613};
614
a783673b
ILT
615// Implement Object::output_section inline for efficiency.
616inline Output_section*
b8e6aad9 617Relobj::output_section(unsigned int shndx, off_t* poff) const
a783673b 618{
5a6f7e2d
ILT
619 gold_assert(shndx < this->map_to_output_.size());
620 const Map_to_output& mo(this->map_to_output_[shndx]);
a783673b
ILT
621 *poff = mo.offset;
622 return mo.output_section;
623}
624
b8e6aad9
ILT
625// This POD class is holds the value of a symbol. This is used for
626// local symbols, and for all symbols during relocation processing.
730cdc88
ILT
627// For special sections, such as SHF_MERGE sections, this calls a
628// function to get the final symbol value.
b8e6aad9
ILT
629
630template<int size>
631class Symbol_value
632{
633 public:
634 typedef typename elfcpp::Elf_types<size>::Elf_Addr Value;
635
636 Symbol_value()
7bf1f802
ILT
637 : output_symtab_index_(0), output_dynsym_index_(-1U), input_shndx_(0),
638 is_section_symbol_(false), is_tls_symbol_(false),
063f12a8 639 needs_output_address_(false), value_(0)
b8e6aad9
ILT
640 { }
641
642 // Get the value of this symbol. OBJECT is the object in which this
643 // symbol is defined, and ADDEND is an addend to add to the value.
644 template<bool big_endian>
645 Value
646 value(const Sized_relobj<size, big_endian>* object, Value addend) const
647 {
648 if (!this->needs_output_address_)
649 return this->value_ + addend;
063f12a8
ILT
650 return object->local_value(this->input_shndx_, this->value_,
651 this->is_section_symbol_, addend);
b8e6aad9
ILT
652 }
653
654 // Set the value of this symbol in the output symbol table.
655 void
656 set_output_value(Value value)
657 {
658 this->value_ = value;
659 this->needs_output_address_ = false;
660 }
661
7bf1f802
ILT
662 // Set the value of the symbol from the input file. This value
663 // will usually be replaced during finalization with the output
664 // value, but if the symbol is mapped to an output section which
665 // requires special handling to determine the output value, we
666 // leave the input value in place until later. This is used for
b8e6aad9
ILT
667 // SHF_MERGE sections.
668 void
669 set_input_value(Value value)
670 {
671 this->value_ = value;
672 this->needs_output_address_ = true;
673 }
674
7bf1f802
ILT
675 // Return the input value.
676 Value
677 input_value() const
678 {
679 gold_assert(this->needs_output_address_);
680 return this->value_;
681 }
682
b8e6aad9
ILT
683 // Return whether this symbol should go into the output symbol
684 // table.
685 bool
686 needs_output_symtab_entry() const
ac1f0c21 687 { return this->output_symtab_index_ != -1U; }
b8e6aad9
ILT
688
689 // Return the index in the output symbol table.
690 unsigned int
691 output_symtab_index() const
692 {
693 gold_assert(this->output_symtab_index_ != 0);
694 return this->output_symtab_index_;
695 }
696
697 // Set the index in the output symbol table.
698 void
699 set_output_symtab_index(unsigned int i)
700 {
701 gold_assert(this->output_symtab_index_ == 0);
702 this->output_symtab_index_ = i;
703 }
704
705 // Record that this symbol should not go into the output symbol
706 // table.
707 void
708 set_no_output_symtab_entry()
709 {
710 gold_assert(this->output_symtab_index_ == 0);
711 this->output_symtab_index_ = -1U;
712 }
713
7bf1f802
ILT
714 // Set the index in the output dynamic symbol table.
715 void
716 set_needs_output_dynsym_entry()
717 {
718 this->output_dynsym_index_ = 0;
719 }
720
721 // Return whether this symbol should go into the output symbol
722 // table.
723 bool
724 needs_output_dynsym_entry() const
725 {
726 return this->output_dynsym_index_ != -1U;
727 }
728
729 // Record that this symbol should go into the dynamic symbol table.
730 void
731 set_output_dynsym_index(unsigned int i)
732 {
733 gold_assert(this->output_dynsym_index_ == 0);
734 this->output_dynsym_index_ = i;
735 }
736
737 // Return the index in the output dynamic symbol table.
738 unsigned int
739 output_dynsym_index() const
740 {
741 gold_assert(this->output_dynsym_index_ != 0);
742 return this->output_dynsym_index_;
743 }
744
b8e6aad9
ILT
745 // Set the index of the input section in the input file.
746 void
747 set_input_shndx(unsigned int i)
730cdc88
ILT
748 {
749 this->input_shndx_ = i;
ac1f0c21
ILT
750 // input_shndx_ field is a bitfield, so make sure that the value
751 // fits.
730cdc88
ILT
752 gold_assert(this->input_shndx_ == i);
753 }
b8e6aad9 754
7bf1f802
ILT
755 // Return the index of the input section in the input file.
756 unsigned int
757 input_shndx() const
758 { return this->input_shndx_; }
759
063f12a8
ILT
760 // Record that this is a section symbol.
761 void
762 set_is_section_symbol()
763 { this->is_section_symbol_ = true; }
764
7bf1f802
ILT
765 // Record that this is a TLS symbol.
766 void
767 set_is_tls_symbol()
768 { this->is_tls_symbol_ = true; }
769
770 // Return TRUE if this is a TLS symbol.
771 bool
772 is_tls_symbol() const
773 { return this->is_tls_symbol_; }
774
b8e6aad9
ILT
775 private:
776 // The index of this local symbol in the output symbol table. This
777 // will be -1 if the symbol should not go into the symbol table.
778 unsigned int output_symtab_index_;
7bf1f802
ILT
779 // The index of this local symbol in the dynamic symbol table. This
780 // will be -1 if the symbol should not go into the symbol table.
781 unsigned int output_dynsym_index_;
b8e6aad9
ILT
782 // The section index in the input file in which this symbol is
783 // defined.
7bf1f802 784 unsigned int input_shndx_ : 29;
063f12a8
ILT
785 // Whether this is a STT_SECTION symbol.
786 bool is_section_symbol_ : 1;
7bf1f802
ILT
787 // Whether this is a STT_TLS symbol.
788 bool is_tls_symbol_ : 1;
b8e6aad9
ILT
789 // Whether getting the value of this symbol requires calling an
790 // Output_section method. For example, this will be true of a
063f12a8 791 // symbol in a SHF_MERGE section.
b8e6aad9
ILT
792 bool needs_output_address_ : 1;
793 // The value of the symbol. If !needs_output_address_, this is the
794 // value in the output file. If needs_output_address_, this is the
795 // value in the input file.
796 Value value_;
797};
798
14bfc3f5 799// A regular object file. This is size and endian specific.
bae7f79e
ILT
800
801template<int size, bool big_endian>
f6ce93d6 802class Sized_relobj : public Relobj
bae7f79e
ILT
803{
804 public:
c06b7b0b 805 typedef typename elfcpp::Elf_types<size>::Elf_Addr Address;
730cdc88 806 typedef std::vector<Symbol*> Symbols;
b8e6aad9 807 typedef std::vector<Symbol_value<size> > Local_values;
c06b7b0b 808
f6ce93d6 809 Sized_relobj(const std::string& name, Input_file* input_file, off_t offset,
bae7f79e
ILT
810 const typename elfcpp::Ehdr<size, big_endian>&);
811
f6ce93d6 812 ~Sized_relobj();
bae7f79e 813
a2fb1b05 814 // Set up the object file based on the ELF header.
bae7f79e
ILT
815 void
816 setup(const typename elfcpp::Ehdr<size, big_endian>&);
817
730cdc88
ILT
818 // If SYM is the index of a global symbol in the object file's
819 // symbol table, return the Symbol object. Otherwise, return NULL.
820 Symbol*
821 global_symbol(unsigned int sym) const
822 {
823 if (sym >= this->local_symbol_count_)
824 {
825 gold_assert(sym - this->local_symbol_count_ < this->symbols_.size());
826 return this->symbols_[sym - this->local_symbol_count_];
827 }
828 return NULL;
829 }
830
831 // Return the section index of symbol SYM. Set *VALUE to its value
832 // in the object file. Note that for a symbol which is not defined
833 // in this object file, this will set *VALUE to 0 and return
834 // SHN_UNDEF; it will not return the final value of the symbol in
835 // the link.
836 unsigned int
837 symbol_section_and_value(unsigned int sym, Address* value);
838
839 // Return a pointer to the Symbol_value structure which holds the
840 // value of a local symbol.
841 const Symbol_value<size>*
842 local_symbol(unsigned int sym) const
843 {
844 gold_assert(sym < this->local_values_.size());
845 return &this->local_values_[sym];
846 }
847
c06b7b0b
ILT
848 // Return the index of local symbol SYM in the ordinary symbol
849 // table. A value of -1U means that the symbol is not being output.
850 unsigned int
851 symtab_index(unsigned int sym) const
852 {
b8e6aad9
ILT
853 gold_assert(sym < this->local_values_.size());
854 return this->local_values_[sym].output_symtab_index();
c06b7b0b
ILT
855 }
856
7bf1f802
ILT
857 // Return the index of local symbol SYM in the dynamic symbol
858 // table. A value of -1U means that the symbol is not being output.
859 unsigned int
860 dynsym_index(unsigned int sym) const
861 {
862 gold_assert(sym < this->local_values_.size());
863 return this->local_values_[sym].output_dynsym_index();
864 }
865
e727fa71
ILT
866 // Return the appropriate Sized_target structure.
867 Sized_target<size, big_endian>*
868 sized_target()
869 {
870 return this->Object::sized_target
871 SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
872 SELECT_SIZE_ENDIAN_ONLY(size, big_endian));
873 }
874
875 // Return the value of the local symbol symndx.
876 Address
877 local_symbol_value(unsigned int symndx) const;
878
879 // Return the value of a local symbol defined in input section
880 // SHNDX, with value VALUE, adding addend ADDEND. IS_SECTION_SYMBOL
881 // indicates whether the symbol is a section symbol. This handles
882 // SHF_MERGE sections.
883 Address
884 local_value(unsigned int shndx, Address value, bool is_section_symbol,
885 Address addend) const;
886
7bf1f802
ILT
887 void
888 set_needs_output_dynsym_entry(unsigned int sym)
889 {
890 gold_assert(sym < this->local_values_.size());
891 this->local_values_[sym].set_needs_output_dynsym_entry();
892 }
893
e727fa71 894 // Return whether the local symbol SYMNDX has a GOT offset.
07f397ab 895 // For TLS symbols, the GOT entry will hold its tp-relative offset.
e727fa71
ILT
896 bool
897 local_has_got_offset(unsigned int symndx) const
898 {
899 return (this->local_got_offsets_.find(symndx)
900 != this->local_got_offsets_.end());
901 }
902
903 // Return the GOT offset of the local symbol SYMNDX.
904 unsigned int
905 local_got_offset(unsigned int symndx) const
906 {
907 Local_got_offsets::const_iterator p =
908 this->local_got_offsets_.find(symndx);
909 gold_assert(p != this->local_got_offsets_.end());
910 return p->second;
911 }
912
913 // Set the GOT offset of the local symbol SYMNDX to GOT_OFFSET.
914 void
915 set_local_got_offset(unsigned int symndx, unsigned int got_offset)
916 {
917 std::pair<Local_got_offsets::iterator, bool> ins =
918 this->local_got_offsets_.insert(std::make_pair(symndx, got_offset));
919 gold_assert(ins.second);
920 }
921
07f397ab
ILT
922 // Return whether the local TLS symbol SYMNDX has a GOT offset.
923 // The GOT entry at this offset will contain a module index. If
924 // NEED_PAIR is true, a second entry immediately following the first
925 // will contain the dtv-relative offset.
926 bool
927 local_has_tls_got_offset(unsigned int symndx, bool need_pair) const
928 {
929 typename Local_tls_got_offsets::const_iterator p =
930 this->local_tls_got_offsets_.find(symndx);
931 if (p == this->local_tls_got_offsets_.end()
932 || (need_pair && !p->second.have_pair_))
933 return false;
934 return true;
935 }
936
937 // Return the offset of the GOT entry for the local TLS symbol SYMNDX.
938 // If NEED_PAIR is true, we need the offset of a pair of GOT entries;
939 // otherwise we need the offset of the GOT entry for the module index.
940 unsigned int
941 local_tls_got_offset(unsigned int symndx, bool need_pair) const
942 {
943 typename Local_tls_got_offsets::const_iterator p =
944 this->local_tls_got_offsets_.find(symndx);
945 gold_assert(p != this->local_tls_got_offsets_.end());
946 gold_assert(!need_pair || p->second.have_pair_);
947 return p->second.got_offset_;
948 }
949
950 // Set the offset of the GOT entry for the local TLS symbol SYMNDX
951 // to GOT_OFFSET. If HAVE_PAIR is true, we have a pair of GOT entries;
952 // otherwise, we have just a single entry for the module index.
953 void
954 set_local_tls_got_offset(unsigned int symndx, unsigned int got_offset,
955 bool have_pair)
956 {
957 typename Local_tls_got_offsets::iterator p =
958 this->local_tls_got_offsets_.find(symndx);
959 if (p != this->local_tls_got_offsets_.end())
960 {
961 // An entry already existed for this symbol. This can happen
962 // if we see a relocation asking for the module index before
963 // a relocation asking for the pair. In that case, the original
964 // GOT entry will remain, but won't get used by any further
965 // relocations.
966 p->second.got_offset_ = got_offset;
967 gold_assert(have_pair);
968 p->second.have_pair_ = true;
969 }
970 else
971 {
972 std::pair<typename Local_tls_got_offsets::iterator, bool> ins =
973 this->local_tls_got_offsets_.insert(
974 std::make_pair(symndx, Tls_got_entry(got_offset, have_pair)));
975 gold_assert(ins.second);
976 }
977 }
978
f7e2ee48
ILT
979 // Return the name of the symbol that spans the given offset in the
980 // specified section in this object. This is used only for error
981 // messages and is not particularly efficient.
982 bool
983 get_symbol_location_info(unsigned int shndx, off_t offset,
984 Symbol_location_info* info);
985
6d013333 986 protected:
a2fb1b05 987 // Read the symbols.
bae7f79e 988 void
12e14209 989 do_read_symbols(Read_symbols_data*);
14bfc3f5 990
6d013333
ILT
991 // Return the number of local symbols.
992 unsigned int
993 do_local_symbol_count() const
994 { return this->local_symbol_count_; }
995
dbe717ef
ILT
996 // Lay out the input sections.
997 void
7e1edb90 998 do_layout(Symbol_table*, Layout*, Read_symbols_data*);
dbe717ef 999
12e14209
ILT
1000 // Add the symbols to the symbol table.
1001 void
1002 do_add_symbols(Symbol_table*, Read_symbols_data*);
a2fb1b05 1003
92e059d8
ILT
1004 // Read the relocs.
1005 void
1006 do_read_relocs(Read_relocs_data*);
1007
1008 // Scan the relocs and adjust the symbol table.
1009 void
ead1e424
ILT
1010 do_scan_relocs(const General_options&, Symbol_table*, Layout*,
1011 Read_relocs_data*);
92e059d8 1012
7bf1f802
ILT
1013 // Count the local symbols.
1014 void
1015 do_count_local_symbols(Stringpool_template<char>*,
1016 Stringpool_template<char>*);
1017
75f65a3e 1018 // Finalize the local symbols.
c06b7b0b 1019 unsigned int
7bf1f802
ILT
1020 do_finalize_local_symbols(unsigned int, off_t);
1021
1022 // Set the offset where local dynamic symbol information will be stored.
1023 unsigned int
1024 do_set_local_dynsym_indexes(unsigned int);
1025
1026 // Set the offset where local dynamic symbol information will be stored.
1027 unsigned int
1028 do_set_local_dynsym_offset(off_t);
75f65a3e 1029
61ba1cf9
ILT
1030 // Relocate the input sections and write out the local symbols.
1031 void
1032 do_relocate(const General_options& options, const Symbol_table* symtab,
92e059d8
ILT
1033 const Layout*, Output_file* of);
1034
1035 // Get the name of a section.
1036 std::string
645f8123
ILT
1037 do_section_name(unsigned int shndx)
1038 { return this->elf_file_.section_name(shndx); }
61ba1cf9 1039
645f8123 1040 // Return the location of the contents of a section.
dbe717ef 1041 Object::Location
645f8123
ILT
1042 do_section_contents(unsigned int shndx)
1043 { return this->elf_file_.section_contents(shndx); }
f6ce93d6 1044
a3ad94ed
ILT
1045 // Return section flags.
1046 uint64_t
1047 do_section_flags(unsigned int shndx)
1048 { return this->elf_file_.section_flags(shndx); }
1049
730cdc88
ILT
1050 // Return section type.
1051 unsigned int
1052 do_section_type(unsigned int shndx)
1053 { return this->elf_file_.section_type(shndx); }
1054
f7e2ee48
ILT
1055 // Return the section link field.
1056 unsigned int
1057 do_section_link(unsigned int shndx)
1058 { return this->elf_file_.section_link(shndx); }
1059
4c50553d
ILT
1060 // Return the section info field.
1061 unsigned int
1062 do_section_info(unsigned int shndx)
1063 { return this->elf_file_.section_info(shndx); }
1064
bae7f79e 1065 private:
a2fb1b05 1066 // For convenience.
f6ce93d6 1067 typedef Sized_relobj<size, big_endian> This;
a2fb1b05
ILT
1068 static const int ehdr_size = elfcpp::Elf_sizes<size>::ehdr_size;
1069 static const int shdr_size = elfcpp::Elf_sizes<size>::shdr_size;
1070 static const int sym_size = elfcpp::Elf_sizes<size>::sym_size;
75f65a3e
ILT
1071 typedef elfcpp::Shdr<size, big_endian> Shdr;
1072
dbe717ef
ILT
1073 // Find the SHT_SYMTAB section, given the section headers.
1074 void
1075 find_symtab(const unsigned char* pshdrs);
1076
730cdc88
ILT
1077 // Return whether SHDR has the right flags for a GNU style exception
1078 // frame section.
1079 bool
1080 check_eh_frame_flags(const elfcpp::Shdr<size, big_endian>* shdr) const;
1081
1082 // Return whether there is a section named .eh_frame which might be
1083 // a GNU style exception frame section.
1084 bool
1085 find_eh_frame(const unsigned char* pshdrs, const char* names,
1086 off_t names_size) const;
1087
a2fb1b05
ILT
1088 // Whether to include a section group in the link.
1089 bool
1090 include_section_group(Layout*, unsigned int,
1091 const elfcpp::Shdr<size, big_endian>&,
1092 std::vector<bool>*);
1093
1094 // Whether to include a linkonce section in the link.
1095 bool
1096 include_linkonce_section(Layout*, const char*,
1097 const elfcpp::Shdr<size, big_endian>&);
1098
61ba1cf9
ILT
1099 // Views and sizes when relocating.
1100 struct View_size
1101 {
1102 unsigned char* view;
1103 typename elfcpp::Elf_types<size>::Elf_Addr address;
1104 off_t offset;
1105 off_t view_size;
730cdc88 1106 bool is_input_output_view;
96803768 1107 bool is_postprocessing_view;
61ba1cf9
ILT
1108 };
1109
1110 typedef std::vector<View_size> Views;
1111
1112 // Write section data to the output file. Record the views and
1113 // sizes in VIEWS for use when relocating.
1114 void
17a1d0a9 1115 write_sections(const unsigned char* pshdrs, Output_file*, Views*) const;
61ba1cf9
ILT
1116
1117 // Relocate the sections in the output file.
1118 void
92e059d8
ILT
1119 relocate_sections(const General_options& options, const Symbol_table*,
1120 const Layout*, const unsigned char* pshdrs, Views*);
61ba1cf9
ILT
1121
1122 // Write out the local symbols.
1123 void
b8e6aad9 1124 write_local_symbols(Output_file*,
7bf1f802 1125 const Stringpool_template<char>*,
b8e6aad9 1126 const Stringpool_template<char>*);
61ba1cf9 1127
07f397ab
ILT
1128 // The GOT offsets of local symbols. This map also stores GOT offsets
1129 // for tp-relative offsets for TLS symbols.
e727fa71
ILT
1130 typedef Unordered_map<unsigned int, unsigned int> Local_got_offsets;
1131
07f397ab
ILT
1132 // The TLS GOT offsets of local symbols. The map stores the offsets
1133 // for either a single GOT entry that holds the module index of a TLS
1134 // symbol, or a pair of GOT entries containing the module index and
1135 // dtv-relative offset.
1136 struct Tls_got_entry
1137 {
1138 Tls_got_entry(int got_offset, bool have_pair)
1139 : got_offset_(got_offset),
1140 have_pair_(have_pair)
1141 { }
1142 int got_offset_;
1143 bool have_pair_;
1144 };
1145 typedef Unordered_map<unsigned int, Tls_got_entry> Local_tls_got_offsets;
1146
645f8123
ILT
1147 // General access to the ELF file.
1148 elfcpp::Elf_file<size, big_endian, Object> elf_file_;
bae7f79e 1149 // Index of SHT_SYMTAB section.
645f8123 1150 unsigned int symtab_shndx_;
61ba1cf9
ILT
1151 // The number of local symbols.
1152 unsigned int local_symbol_count_;
1153 // The number of local symbols which go into the output file.
1154 unsigned int output_local_symbol_count_;
7bf1f802
ILT
1155 // The number of local symbols which go into the output file's dynamic
1156 // symbol table.
1157 unsigned int output_local_dynsym_count_;
14bfc3f5 1158 // The entries in the symbol table for the external symbols.
730cdc88 1159 Symbols symbols_;
75f65a3e
ILT
1160 // File offset for local symbols.
1161 off_t local_symbol_offset_;
7bf1f802
ILT
1162 // File offset for local dynamic symbols.
1163 off_t local_dynsym_offset_;
61ba1cf9 1164 // Values of local symbols.
c06b7b0b 1165 Local_values local_values_;
07f397ab
ILT
1166 // GOT offsets for local non-TLS symbols, and tp-relative offsets
1167 // for TLS symbols, indexed by symbol number.
e727fa71 1168 Local_got_offsets local_got_offsets_;
07f397ab
ILT
1169 // GOT offsets for local TLS symbols, indexed by symbol number
1170 // and GOT entry type.
1171 Local_tls_got_offsets local_tls_got_offsets_;
730cdc88
ILT
1172 // Whether this object has a GNU style .eh_frame section.
1173 bool has_eh_frame_;
bae7f79e
ILT
1174};
1175
54dc6425 1176// A class to manage the list of all objects.
a2fb1b05 1177
54dc6425
ILT
1178class Input_objects
1179{
1180 public:
1181 Input_objects()
9a2d6984
ILT
1182 : relobj_list_(), dynobj_list_(), target_(NULL), sonames_(),
1183 system_library_directory_()
54dc6425
ILT
1184 { }
1185
f6ce93d6
ILT
1186 // The type of the list of input relocateable objects.
1187 typedef std::vector<Relobj*> Relobj_list;
1188 typedef Relobj_list::const_iterator Relobj_iterator;
1189
1190 // The type of the list of input dynamic objects.
1191 typedef std::vector<Dynobj*> Dynobj_list;
1192 typedef Dynobj_list::const_iterator Dynobj_iterator;
54dc6425 1193
008db82e
ILT
1194 // Add an object to the list. Return true if all is well, or false
1195 // if this object should be ignored.
1196 bool
54dc6425
ILT
1197 add_object(Object*);
1198
75f65a3e
ILT
1199 // Get the target we should use for the output file.
1200 Target*
1201 target() const
1202 { return this->target_; }
1203
e2827e5f
ILT
1204 // For each dynamic object, check whether we've seen all of its
1205 // explicit dependencies.
1206 void
1207 check_dynamic_dependencies() const;
1208
9a2d6984
ILT
1209 // Return whether an object was found in the system library
1210 // directory.
1211 bool
1212 found_in_system_library_directory(const Object*) const;
1213
f6ce93d6
ILT
1214 // Iterate over all regular objects.
1215
1216 Relobj_iterator
1217 relobj_begin() const
1218 { return this->relobj_list_.begin(); }
1219
1220 Relobj_iterator
1221 relobj_end() const
1222 { return this->relobj_list_.end(); }
1223
1224 // Iterate over all dynamic objects.
1225
1226 Dynobj_iterator
1227 dynobj_begin() const
1228 { return this->dynobj_list_.begin(); }
54dc6425 1229
f6ce93d6
ILT
1230 Dynobj_iterator
1231 dynobj_end() const
1232 { return this->dynobj_list_.end(); }
54dc6425
ILT
1233
1234 // Return whether we have seen any dynamic objects.
1235 bool
1236 any_dynamic() const
f6ce93d6 1237 { return !this->dynobj_list_.empty(); }
54dc6425 1238
fe9a4c12
ILT
1239 // Return the number of input objects.
1240 int
1241 number_of_input_objects() const
1242 { return this->relobj_list_.size() + this->dynobj_list_.size(); }
1243
54dc6425
ILT
1244 private:
1245 Input_objects(const Input_objects&);
1246 Input_objects& operator=(const Input_objects&);
1247
008db82e 1248 // The list of ordinary objects included in the link.
f6ce93d6 1249 Relobj_list relobj_list_;
008db82e 1250 // The list of dynamic objects included in the link.
f6ce93d6 1251 Dynobj_list dynobj_list_;
008db82e 1252 // The target.
75f65a3e 1253 Target* target_;
008db82e
ILT
1254 // SONAMEs that we have seen.
1255 Unordered_set<std::string> sonames_;
9a2d6984
ILT
1256 // The directory in which we find the libc.so.
1257 std::string system_library_directory_;
54dc6425 1258};
a2fb1b05 1259
92e059d8
ILT
1260// Some of the information we pass to the relocation routines. We
1261// group this together to avoid passing a dozen different arguments.
1262
1263template<int size, bool big_endian>
1264struct Relocate_info
1265{
1266 // Command line options.
1267 const General_options* options;
1268 // Symbol table.
1269 const Symbol_table* symtab;
1270 // Layout.
1271 const Layout* layout;
1272 // Object being relocated.
f6ce93d6 1273 Sized_relobj<size, big_endian>* object;
92e059d8
ILT
1274 // Section index of relocation section.
1275 unsigned int reloc_shndx;
1276 // Section index of section being relocated.
1277 unsigned int data_shndx;
1278
1279 // Return a string showing the location of a relocation. This is
1280 // only used for error messages.
1281 std::string
1282 location(size_t relnum, off_t reloffset) const;
1283};
1284
bae7f79e
ILT
1285// Return an Object appropriate for the input file. P is BYTES long,
1286// and holds the ELF header.
1287
61ba1cf9
ILT
1288extern Object*
1289make_elf_object(const std::string& name, Input_file*,
1290 off_t offset, const unsigned char* p,
1291 off_t bytes);
bae7f79e
ILT
1292
1293} // end namespace gold
1294
1295#endif // !defined(GOLD_OBJECT_H)
This page took 0.133255 seconds and 4 git commands to generate.