From 91ff43fe2d1d9c8594e06385af78ed29a063690f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Tue, 15 Jun 2010 19:22:25 +0000 Subject: [PATCH] 2010-06-15 Rafael Espindola * plugin.cc (Plugin_hook::run): Set in_real_elf for the start symbol. --- gold/ChangeLog | 4 ++++ gold/plugin.cc | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/gold/ChangeLog b/gold/ChangeLog index 5c63a9ace71..b7bff3b7cfa 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2010-06-15 Rafael Espindola + + * plugin.cc (Plugin_hook::run): Set in_real_elf for the start symbol. + 2010-06-15 Viktor Kutuzov * fileread.cc: Only #include if HAVE_READV. diff --git a/gold/plugin.cc b/gold/plugin.cc index 798b601e709..4cf2f6a4547 100644 --- a/gold/plugin.cc +++ b/gold/plugin.cc @@ -916,6 +916,14 @@ void Plugin_hook::run(Workqueue* workqueue) { gold_assert(this->options_.has_plugins()); + Symbol* start_sym; + if (parameters->options().entry()) + start_sym = this->symtab_->lookup(parameters->options().entry()); + else + start_sym = this->symtab_->lookup("_start"); + if (start_sym != NULL) + start_sym->set_in_real_elf(); + this->options_.plugins()->all_symbols_read(workqueue, this, this->input_objects_, -- 2.30.2