aboutsummaryrefslogtreecommitdiff
path: root/gold/parameters.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-05-25 00:17:47 +0000
committerIan Lance Taylor <ian@airs.com>2011-05-25 00:17:47 +0000
commita10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d (patch)
treedb379e021d168b95da97d0a9eb80e0175b3142ad /gold/parameters.cc
parent012ca7c8a8622d803a1f367ac9bd53be7f8eafee (diff)
downloadfsf-binutils-gdb-a10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d.zip
fsf-binutils-gdb-a10ae760821ec6f09cf63f93e3b2ff0e03fbaa3d.tar.gz
fsf-binutils-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/parameters.cc')
-rw-r--r--gold/parameters.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/parameters.cc b/gold/parameters.cc
index e04168f..194c81b 100644
--- a/gold/parameters.cc
+++ b/gold/parameters.cc
@@ -211,6 +211,20 @@ Parameters::check_target_endianness()
}
}
+// Return the name of the entry symbol.
+
+const char*
+Parameters::entry() const
+{
+ const char* ret = this->options().entry();
+ if (ret == NULL)
+ {
+ // FIXME: Need to support target specific entry symbol.
+ ret = "_start";
+ }
+ return ret;
+}
+
// Set the incremental linking mode to INCREMENTAL_FULL. Used when
// the linker determines that an incremental update is not possible.
// Returns false if the incremental mode was INCREMENTAL_UPDATE,