diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-05-25 00:17:47 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-05-25 00:17:47 +0000 |
commit | a10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d (patch) | |
tree | db379e021d168b95da97d0a9eb80e0175b3142ad /gold/output.cc | |
parent | 012ca7c8a8622d803a1f367ac9bd53be7f8eafee (diff) | |
download | gdb-a10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d.zip gdb-a10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d.tar.gz gdb-a10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d.tar.bz2 |
* archive.cc (Library_base::should_include_member): Pull in object
from archive if it defines the entry symbol.
* parameters.cc (Parameters::entry): New function.
* parameters.h (class Parameters): Declare entry.
* output.h (class Output_file_header): Remove entry_ field.
* output.cc (Output_file_header::Output_file_header): Remove entry
parameter. Change all callers.
(Output_file_header::entry): Use parameters->entry.
* gold.cc (queue_middle_tasks): Likewise.
* plugin.cc (Plugin_hook::run): Likewise.
Diffstat (limited to 'gold/output.cc')
-rw-r--r-- | gold/output.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gold/output.cc b/gold/output.cc index b3fd35d..202d8c2 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -425,14 +425,12 @@ Output_segment_headers::do_size() const Output_file_header::Output_file_header(const Target* target, const Symbol_table* symtab, - const Output_segment_headers* osh, - const char* entry) + const Output_segment_headers* osh) : target_(target), symtab_(symtab), segment_header_(osh), section_header_(NULL), - shstrtab_(NULL), - entry_(entry) + shstrtab_(NULL) { this->set_data_size(this->do_size()); } @@ -572,22 +570,16 @@ Output_file_header::do_sized_write(Output_file* of) of->write_output_view(0, ehdr_size, view); } -// Return the value to use for the entry address. THIS->ENTRY_ is the -// symbol specified on the command line, if any. +// Return the value to use for the entry address. template<int size> typename elfcpp::Elf_types<size>::Elf_Addr Output_file_header::entry() { - const bool should_issue_warning = (this->entry_ != NULL + const bool should_issue_warning = (parameters->options().entry() != NULL && !parameters->options().relocatable() && !parameters->options().shared()); - - // FIXME: Need to support target specific entry symbol. - const char* entry = this->entry_; - if (entry == NULL) - entry = "_start"; - + const char* entry = parameters->entry(); Symbol* sym = this->symtab_->lookup(entry); typename Sized_symbol<size>::Value_type v; |